diff --git .classpath._hbase .classpath._hbase deleted file mode 100644 index 15fd1c5..0000000 --- .classpath._hbase +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git .gitignore .gitignore index e54804f..a0449e0 100644 --- .gitignore +++ .gitignore @@ -1,6 +1,6 @@ build build-eclipse -.classpath +.classpath* .externalToolBuilders .project .settings diff --git build-common.xml build-common.xml index 53fd1b1..1e348c7 100644 --- build-common.xml +++ build-common.xml @@ -25,6 +25,8 @@ + + @@ -34,6 +36,8 @@ + + @@ -101,7 +105,7 @@ - + @@ -159,18 +163,18 @@ log="${ivyresolvelog}"/> - - - - - + + + + - + @@ -461,4 +465,15 @@ + + + + + + + + + + + diff --git build.xml build.xml index dc20725..41a4dbc 100644 --- build.xml +++ build.xml @@ -25,6 +25,8 @@ + + @@ -91,6 +93,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -121,7 +145,7 @@ - @@ -165,16 +189,24 @@ + + + + + + + + - @@ -212,7 +244,7 @@ - + @@ -280,16 +312,16 @@ - + - + - + - + @@ -298,16 +330,16 @@ - + - + - + - + @@ -320,7 +352,7 @@ - + @@ -449,18 +481,21 @@ - + - + + - + + + diff --git eclipse-templates/.classpath eclipse-templates/.classpath index d06d6bd..23e33cc 100644 --- eclipse-templates/.classpath +++ eclipse-templates/.classpath @@ -16,10 +16,10 @@ - - - - + + + + @@ -33,25 +33,28 @@ - - + + + + - + - + - + + - + diff --git eclipse-templates/.classpath._hbase eclipse-templates/.classpath._hbase index b81c24a..f0e5a33 100644 --- eclipse-templates/.classpath._hbase +++ eclipse-templates/.classpath._hbase @@ -6,29 +6,29 @@ - + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -42,7 +42,8 @@ - + + @@ -53,7 +54,7 @@ - + - + diff --git ivy/libraries.properties ivy/libraries.properties index fdd54c8..ef24aff 100644 --- ivy/libraries.properties +++ ivy/libraries.properties @@ -35,11 +35,16 @@ commons-lang.version=2.4 commons-logging.version=1.0.4 commons-logging-api.version=1.0.4 commons-pool.version=1.5.4 +hbase.version=0.20.3 +hbase-test.version=0.20.3 jdo-api.version=3.0.0 jdom.version=1.1 jline.version=0.9.94 junit.version=3.8.1 ivy.version=2.1.0 log4j.version=1.2.15 +slf4j-api.version=1.6.1 +slf4j-log4j12.version=1.6.1 +thrift.version=0.5.0 +thrift-fb303.version=0.5.0 zookeeper.version=3.2.2 - diff --git lib/README lib/README index 72d90b7..1c2f0b1 100644 --- lib/README +++ lib/README @@ -1,8 +1,8 @@ Folowing is the list of external jars contained in this directory and the sources from where they were obtained: --------------------------------------------------------------------------------------------------------------- -* libfb303.jar - http://developers.facebook.com/thrift/ -* libthrift.jar - http://developers.facebook.com/thrift/ +* thrift-0.5.0.jar - http://thrift.apache.org/ +* thrift-fb303-0.5.0.jar - http://thrift.apache.org/ * jpox-core-1.2.2.jar - http://www.jpox.org/docs/download.html * derby.jar - http://db.apache.org/derby/derby_downloads.html * asm-3.1.jar - http://forge.objectweb.org/projects/asm/ diff --git lib/libfb303.LICENSE lib/libfb303.LICENSE deleted file mode 100644 index 6b5c3b1..0000000 --- lib/libfb303.LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Thrift Software License - -Copyright © 2006- Facebook, Inc. - -Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the -software and accompanying documentation covered by this license (the "Software") to use, reproduce, -display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, -and to permit third-parties to whom the Software is furnished to do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including the above license grant, -this restriction and the following disclaimer, must be included in all copies of the Software, in whole -or in part, and all derivative works of the Software, unless such copies or derivative works are solely -in the form of machine-executable object code generated by a source language processor. - -The software is provided "as is", without warranty of any kind, express or implied, including but not -limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement. -In no event shall the copyright holders or anyone distributing the software be liable for any damages or -other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the -software or the use or other dealings in the software. diff --git lib/libfb303.jar lib/libfb303.jar deleted file mode 100644 index 516b597..0000000 Binary files lib/libfb303.jar and /dev/null differ diff --git lib/libthrift.LICENSE lib/libthrift.LICENSE deleted file mode 100644 index 6b5c3b1..0000000 --- lib/libthrift.LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Thrift Software License - -Copyright © 2006- Facebook, Inc. - -Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the -software and accompanying documentation covered by this license (the "Software") to use, reproduce, -display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, -and to permit third-parties to whom the Software is furnished to do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including the above license grant, -this restriction and the following disclaimer, must be included in all copies of the Software, in whole -or in part, and all derivative works of the Software, unless such copies or derivative works are solely -in the form of machine-executable object code generated by a source language processor. - -The software is provided "as is", without warranty of any kind, express or implied, including but not -limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement. -In no event shall the copyright holders or anyone distributing the software be liable for any damages or -other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the -software or the use or other dealings in the software. diff --git lib/libthrift.jar lib/libthrift.jar deleted file mode 100644 index 7e7f90e..0000000 Binary files lib/libthrift.jar and /dev/null differ diff --git lib/thrift-0.5.0.jar lib/thrift-0.5.0.jar new file mode 100644 index 0000000..f38617b Binary files /dev/null and lib/thrift-0.5.0.jar differ diff --git lib/thrift-fb303-0.5.0.jar lib/thrift-fb303-0.5.0.jar new file mode 100644 index 0000000..bad90ce Binary files /dev/null and lib/thrift-fb303-0.5.0.jar differ diff --git lib/thrift-fb303.LICENSE lib/thrift-fb303.LICENSE new file mode 100644 index 0000000..4eacb64 --- /dev/null +++ lib/thrift-fb303.LICENSE @@ -0,0 +1,16 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. diff --git lib/thrift.LICENSE lib/thrift.LICENSE new file mode 100644 index 0000000..9d189ef --- /dev/null +++ lib/thrift.LICENSE @@ -0,0 +1,324 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------- +SOFTWARE DISTRIBUTED WITH THRIFT: + +The Apache Thrift software includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +-------------------------------------------------- +Portions of the following files are licensed under the MIT License: + + lib/erl/src/Makefile.am + +Please see doc/otp-base-license.txt for the full terms of this license. + + +-------------------------------------------------- +The following files contain some portions of code contributed under +the Thrift Software License (see doc/old-thrift-license.txt), and relicensed +under the Apache 2.0 License: + + compiler/cpp/Makefile.am + compiler/cpp/src/generate/t_cocoa_generator.cc + compiler/cpp/src/generate/t_cpp_generator.cc + compiler/cpp/src/generate/t_csharp_generator.cc + compiler/cpp/src/generate/t_erl_generator.cc + compiler/cpp/src/generate/t_hs_generator.cc + compiler/cpp/src/generate/t_java_generator.cc + compiler/cpp/src/generate/t_ocaml_generator.cc + compiler/cpp/src/generate/t_perl_generator.cc + compiler/cpp/src/generate/t_php_generator.cc + compiler/cpp/src/generate/t_py_generator.cc + compiler/cpp/src/generate/t_rb_generator.cc + compiler/cpp/src/generate/t_st_generator.cc + compiler/cpp/src/generate/t_xsd_generator.cc + compiler/cpp/src/main.cc + compiler/cpp/src/parse/t_field.h + compiler/cpp/src/parse/t_program.h + compiler/cpp/src/platform.h + compiler/cpp/src/thriftl.ll + compiler/cpp/src/thrifty.yy + lib/csharp/src/Protocol/TBinaryProtocol.cs + lib/csharp/src/Protocol/TField.cs + lib/csharp/src/Protocol/TList.cs + lib/csharp/src/Protocol/TMap.cs + lib/csharp/src/Protocol/TMessage.cs + lib/csharp/src/Protocol/TMessageType.cs + lib/csharp/src/Protocol/TProtocol.cs + lib/csharp/src/Protocol/TProtocolException.cs + lib/csharp/src/Protocol/TProtocolFactory.cs + lib/csharp/src/Protocol/TProtocolUtil.cs + lib/csharp/src/Protocol/TSet.cs + lib/csharp/src/Protocol/TStruct.cs + lib/csharp/src/Protocol/TType.cs + lib/csharp/src/Server/TServer.cs + lib/csharp/src/Server/TSimpleServer.cs + lib/csharp/src/Server/TThreadPoolServer.cs + lib/csharp/src/TApplicationException.cs + lib/csharp/src/Thrift.csproj + lib/csharp/src/Thrift.sln + lib/csharp/src/TProcessor.cs + lib/csharp/src/Transport/TServerSocket.cs + lib/csharp/src/Transport/TServerTransport.cs + lib/csharp/src/Transport/TSocket.cs + lib/csharp/src/Transport/TStreamTransport.cs + lib/csharp/src/Transport/TTransport.cs + lib/csharp/src/Transport/TTransportException.cs + lib/csharp/src/Transport/TTransportFactory.cs + lib/csharp/ThriftMSBuildTask/Properties/AssemblyInfo.cs + lib/csharp/ThriftMSBuildTask/ThriftBuild.cs + lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj + lib/rb/lib/thrift.rb + lib/st/README + lib/st/thrift.st + test/OptionalRequiredTest.cpp + test/OptionalRequiredTest.thrift + test/ThriftTest.thrift + +-------------------------------------------------- +For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components: + +# Copyright (c) 2007 Thomas Porschberg +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +-------------------------------------------------- +For the compiler/cpp/src/md5.[ch] components: + +/* + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ + +--------------------------------------------------- +For the lib/rb/setup.rb: Copyright (c) 2000-2005 Minero Aoki, +lib/ocaml/OCamlMakefile and lib/ocaml/README-OCamlMakefile components: + Copyright (C) 1999 - 2007 Markus Mottl + +Licensed under the terms of the GNU Lesser General Public License 2.1 +(see doc/lgpl-2.1.txt for the full terms of this license) diff --git metastore/build.xml metastore/build.xml index ffb86c1..7f01f91 100755 --- metastore/build.xml +++ metastore/build.xml @@ -22,36 +22,37 @@ - - Executing thrift (which needs to be in your path) to build java metastore APIs.... - - + + You must set the 'thrift.home' property! + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_metastore.thrift + + - + Building Grammar ${src.dir}/java/org/apache/hadoop/hive/metastore/parser/Filter.g .... - + - + @@ -47,5 +63,7 @@ + + diff --git metastore/src/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen-cpp/ThriftHiveMetastore.cpp deleted file mode 100644 index 1bdfb52..0000000 --- metastore/src/gen-cpp/ThriftHiveMetastore.cpp +++ /dev/null @@ -1,12892 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "ThriftHiveMetastore.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -uint32_t ThriftHiveMetastore_create_database_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->database.read(iprot); - this->__isset.database = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->database.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 += (*(this->database)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_database_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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_database_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_database_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_database_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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool((*(this->deleteData))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_databases_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->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->pattern); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->pattern))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_databases_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 _size90; - apache::thrift::protocol::TType _etype93; - iprot->readListBegin(_etype93, _size90); - this->success.resize(_size90); - uint32_t _i94; - for (_i94 = 0; _i94 < _size90; ++_i94) - { - xfer += iprot->readString(this->success[_i94]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter95; - for (_iter95 = this->success.begin(); _iter95 != this->success.end(); ++_iter95) - { - xfer += oprot->writeString((*_iter95)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_databases_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 _size96; - apache::thrift::protocol::TType _etype99; - iprot->readListBegin(_etype99, _size96); - (*(this->success)).resize(_size96); - uint32_t _i100; - for (_i100 = 0; _i100 < _size96; ++_i100) - { - xfer += iprot->readString((*(this->success))[_i100]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_databases_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 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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size101; - apache::thrift::protocol::TType _etype104; - iprot->readListBegin(_etype104, _size101); - this->success.resize(_size101); - uint32_t _i105; - for (_i105 = 0; _i105 < _size101; ++_i105) - { - xfer += iprot->readString(this->success[_i105]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter106; - for (_iter106 = this->success.begin(); _iter106 != this->success.end(); ++_iter106) - { - xfer += oprot->writeString((*_iter106)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_databases_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 _size107; - apache::thrift::protocol::TType _etype110; - iprot->readListBegin(_etype110, _size107); - (*(this->success)).resize(_size107); - uint32_t _i111; - for (_i111 = 0; _i111 < _size107; ++_i111) - { - xfer += iprot->readString((*(this->success))[_i111]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_type_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->type.read(iprot); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->type.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 += (*(this->type)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_type_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->type); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->type); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->type))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_all_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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size112; - apache::thrift::protocol::TType _ktype113; - apache::thrift::protocol::TType _vtype114; - iprot->readMapBegin(_ktype113, _vtype114, _size112); - uint32_t _i116; - for (_i116 = 0; _i116 < _size112; ++_i116) - { - std::string _key117; - xfer += iprot->readString(_key117); - Type& _val118 = this->success[_key117]; - xfer += _val118.read(iprot); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->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) - { - xfer += oprot->writeString(_iter119->first); - xfer += _iter119->second.write(oprot); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size120; - apache::thrift::protocol::TType _ktype121; - apache::thrift::protocol::TType _vtype122; - iprot->readMapBegin(_ktype121, _vtype122, _size120); - uint32_t _i124; - for (_i124 = 0; _i124 < _size120; ++_i124) - { - std::string _key125; - xfer += iprot->readString(_key125); - Type& _val126 = (*(this->success))[_key125]; - xfer += _val126.read(iprot); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->table_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->table_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_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 _size127; - apache::thrift::protocol::TType _etype130; - iprot->readListBegin(_etype130, _size127); - this->success.resize(_size127); - uint32_t _i131; - for (_i131 = 0; _i131 < _size127; ++_i131) - { - xfer += this->success[_i131].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter132; - for (_iter132 = this->success.begin(); _iter132 != this->success.end(); ++_iter132) - { - xfer += (*_iter132).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_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 _size133; - apache::thrift::protocol::TType _etype136; - iprot->readListBegin(_etype136, _size133); - (*(this->success)).resize(_size133); - uint32_t _i137; - for (_i137 = 0; _i137 < _size133; ++_i137) - { - xfer += (*(this->success))[_i137].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->table_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->table_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_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 _size138; - apache::thrift::protocol::TType _etype141; - iprot->readListBegin(_etype141, _size138); - this->success.resize(_size138); - uint32_t _i142; - for (_i142 = 0; _i142 < _size138; ++_i142) - { - xfer += this->success[_i142].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter143; - for (_iter143 = this->success.begin(); _iter143 != this->success.end(); ++_iter143) - { - xfer += (*_iter143).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_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 _size144; - apache::thrift::protocol::TType _etype147; - iprot->readListBegin(_etype147, _size144); - (*(this->success)).resize(_size144); - uint32_t _i148; - for (_i148 = 0; _i148 < _size144; ++_i148) - { - xfer += (*(this->success))[_i148].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->tbl.read(iprot); - this->__isset.tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->tbl.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 += (*(this->tbl)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_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->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - 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->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->dbname))); - xfer += oprot->writeFieldEnd(); - 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->writeBool((*(this->deleteData))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->pattern); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->pattern))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_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 _size149; - apache::thrift::protocol::TType _etype152; - iprot->readListBegin(_etype152, _size149); - this->success.resize(_size149); - uint32_t _i153; - for (_i153 = 0; _i153 < _size149; ++_i153) - { - xfer += iprot->readString(this->success[_i153]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter154; - for (_iter154 = this->success.begin(); _iter154 != this->success.end(); ++_iter154) - { - xfer += oprot->writeString((*_iter154)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_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 _size155; - apache::thrift::protocol::TType _etype158; - iprot->readListBegin(_etype158, _size155); - (*(this->success)).resize(_size155); - uint32_t _i159; - for (_i159 = 0; _i159 < _size155; ++_i159) - { - xfer += iprot->readString((*(this->success))[_i159]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_tables_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size160; - apache::thrift::protocol::TType _etype163; - iprot->readListBegin(_etype163, _size160); - this->success.resize(_size160); - uint32_t _i164; - for (_i164 = 0; _i164 < _size160; ++_i164) - { - xfer += iprot->readString(this->success[_i164]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter165; - for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165) - { - xfer += oprot->writeString((*_iter165)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_tables_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 _size166; - apache::thrift::protocol::TType _etype169; - iprot->readListBegin(_etype169, _size166); - (*(this->success)).resize(_size166); - uint32_t _i170; - for (_i170 = 0; _i170 < _size166; ++_i170) - { - xfer += iprot->readString((*(this->success))[_i170]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_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->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->dbname))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_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->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_tbl.read(iprot); - this->__isset.new_tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_tbl", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->new_tbl.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->dbname))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_tbl", apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->new_tbl)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->new_part.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 += (*(this->new_part)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size171; - apache::thrift::protocol::TType _etype174; - iprot->readListBegin(_etype174, _size171); - this->part_vals.resize(_size171); - uint32_t _i175; - for (_i175 = 0; _i175 < _size171; ++_i175) - { - xfer += iprot->readString(this->part_vals[_i175]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter176)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter177)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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; - 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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->part_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size178; - apache::thrift::protocol::TType _etype181; - iprot->readListBegin(_etype181, _size178); - this->part_vals.resize(_size178); - uint32_t _i182; - for (_i182 = 0; _i182 < _size178; ++_i182) - { - xfer += iprot->readString(this->part_vals[_i182]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter183)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter184)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool((*(this->deleteData))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_by_name_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->part_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool((*(this->deleteData))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size185; - apache::thrift::protocol::TType _etype188; - iprot->readListBegin(_etype188, _size185); - this->part_vals.resize(_size185); - uint32_t _i189; - for (_i189 = 0; _i189 < _size185; ++_i189) - { - xfer += iprot->readString(this->part_vals[_i189]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter190)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter191)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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; - 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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->part_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_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 _size192; - apache::thrift::protocol::TType _etype195; - iprot->readListBegin(_etype195, _size192); - this->success.resize(_size192); - uint32_t _i196; - for (_i196 = 0; _i196 < _size192; ++_i196) - { - xfer += this->success[_i196].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter197; - for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) - { - xfer += (*_iter197).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_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 _size198; - apache::thrift::protocol::TType _etype201; - iprot->readListBegin(_etype201, _size198); - (*(this->success)).resize(_size198); - uint32_t _i202; - for (_i202 = 0; _i202 < _size198; ++_i202) - { - xfer += (*(this->success))[_i202].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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; - 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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size203; - apache::thrift::protocol::TType _etype206; - iprot->readListBegin(_etype206, _size203); - this->success.resize(_size203); - uint32_t _i207; - for (_i207 = 0; _i207 < _size203; ++_i207) - { - xfer += iprot->readString(this->success[_i207]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter208; - for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) - { - xfer += oprot->writeString((*_iter208)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size209; - apache::thrift::protocol::TType _etype212; - iprot->readListBegin(_etype212, _size209); - (*(this->success)).resize(_size209); - uint32_t _i213; - for (_i213 = 0; _i213 < _size209; ++_i213) - { - xfer += iprot->readString((*(this->success))[_i213]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_ps_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size214; - apache::thrift::protocol::TType _etype217; - iprot->readListBegin(_etype217, _size214); - this->part_vals.resize(_size214); - uint32_t _i218; - for (_i218 = 0; _i218 < _size214; ++_i218) - { - xfer += iprot->readString(this->part_vals[_i218]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter219)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter220)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size221; - apache::thrift::protocol::TType _etype224; - iprot->readListBegin(_etype224, _size221); - this->success.resize(_size221); - uint32_t _i225; - for (_i225 = 0; _i225 < _size221; ++_i225) - { - xfer += this->success[_i225].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter226; - for (_iter226 = this->success.begin(); _iter226 != this->success.end(); ++_iter226) - { - xfer += (*_iter226).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size227; - apache::thrift::protocol::TType _etype230; - iprot->readListBegin(_etype230, _size227); - (*(this->success)).resize(_size227); - uint32_t _i231; - for (_i231 = 0; _i231 < _size227; ++_i231) - { - xfer += (*(this->success))[_i231].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_ps_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size232; - apache::thrift::protocol::TType _etype235; - iprot->readListBegin(_etype235, _size232); - this->part_vals.resize(_size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) - { - xfer += iprot->readString(this->part_vals[_i236]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter237)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - 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) - { - xfer += oprot->writeString((*_iter238)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size239; - apache::thrift::protocol::TType _etype242; - iprot->readListBegin(_etype242, _size239); - this->success.resize(_size239); - uint32_t _i243; - for (_i243 = 0; _i243 < _size239; ++_i243) - { - xfer += iprot->readString(this->success[_i243]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter244; - for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244) - { - xfer += oprot->writeString((*_iter244)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_ps_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 _size245; - apache::thrift::protocol::TType _etype248; - iprot->readListBegin(_etype248, _size245); - (*(this->success)).resize(_size245); - uint32_t _i249; - for (_i249 = 0; _i249 < _size245; ++_i249) - { - xfer += iprot->readString((*(this->success))[_i249]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("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->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("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->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size250; - apache::thrift::protocol::TType _etype253; - iprot->readListBegin(_etype253, _size250); - this->success.resize(_size250); - uint32_t _i254; - for (_i254 = 0; _i254 < _size250; ++_i254) - { - xfer += this->success[_i254].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter255; - for (_iter255 = this->success.begin(); _iter255 != this->success.end(); ++_iter255) - { - xfer += (*_iter255).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size256; - apache::thrift::protocol::TType _etype259; - iprot->readListBegin(_etype259, _size256); - (*(this->success)).resize(_size256); - uint32_t _i260; - for (_i260 = 0; _i260 < _size256; ++_i260) - { - xfer += (*(this->success))[_i260].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->new_part.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->new_part)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_config_value_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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->defaultValue); - this->__isset.defaultValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->defaultValue); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->defaultValue))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_vals_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->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_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->writeString(this->part_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->part_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size261; - apache::thrift::protocol::TType _etype264; - iprot->readListBegin(_etype264, _size261); - this->success.resize(_size261); - uint32_t _i265; - for (_i265 = 0; _i265 < _size261; ++_i265) - { - xfer += iprot->readString(this->success[_i265]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter266; - for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266) - { - xfer += oprot->writeString((*_iter266)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_vals_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 _size267; - apache::thrift::protocol::TType _etype270; - iprot->readListBegin(_etype270, _size267); - (*(this->success)).resize(_size267); - uint32_t _i271; - for (_i271 = 0; _i271 < _size267; ++_i271) - { - xfer += iprot->readString((*(this->success))[_i271]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_spec_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->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_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->writeString(this->part_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->part_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size272; - apache::thrift::protocol::TType _ktype273; - apache::thrift::protocol::TType _vtype274; - iprot->readMapBegin(_ktype273, _vtype274, _size272); - uint32_t _i276; - for (_i276 = 0; _i276 < _size272; ++_i276) - { - std::string _key277; - xfer += iprot->readString(_key277); - std::string& _val278 = this->success[_key277]; - xfer += iprot->readString(_val278); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_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->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) - { - xfer += oprot->writeString(_iter279->first); - xfer += oprot->writeString(_iter279->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size280; - apache::thrift::protocol::TType _ktype281; - apache::thrift::protocol::TType _vtype282; - iprot->readMapBegin(_ktype281, _vtype282, _size280); - uint32_t _i284; - for (_i284 = 0; _i284 < _size280; ++_i284) - { - std::string _key285; - xfer += iprot->readString(_key285); - std::string& _val286 = (*(this->success))[_key285]; - xfer += iprot->readString(_val286); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_index.read(iprot); - this->__isset.new_index = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->index_table.read(iprot); - this->__isset.index_table = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->new_index.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->index_table.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 += (*(this->new_index)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); - xfer += (*(this->index_table)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_add_index_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_add_index_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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_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->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_tbl_name); - this->__isset.base_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->idx_name); - this->__isset.idx_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_idx.read(iprot); - this->__isset.new_idx = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("base_tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->base_tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("idx_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->idx_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_idx", apache::thrift::protocol::T_STRUCT, 4); - xfer += this->new_idx.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbname))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("base_tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->base_tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("idx_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->idx_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_idx", apache::thrift::protocol::T_STRUCT, 4); - xfer += (*(this->new_idx)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_index_by_name_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("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->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("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->writeBool((*(this->deleteData))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_index_by_name_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->index_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->index_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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 += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_indexes_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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_indexes_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 _size287; - apache::thrift::protocol::TType _etype290; - iprot->readListBegin(_etype290, _size287); - this->success.resize(_size287); - uint32_t _i291; - for (_i291 = 0; _i291 < _size287; ++_i291) - { - xfer += this->success[_i291].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter292; - for (_iter292 = this->success.begin(); _iter292 != this->success.end(); ++_iter292) - { - xfer += (*_iter292).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHiveMetastore_get_indexes_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 _size293; - apache::thrift::protocol::TType _etype296; - iprot->readListBegin(_etype296, _size293); - (*(this->success)).resize(_size293); - uint32_t _i297; - for (_i297 = 0; _i297 < _size293; ++_i297) - { - xfer += (*(this->success))[_i297].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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; - 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->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size298; - apache::thrift::protocol::TType _etype301; - iprot->readListBegin(_etype301, _size298); - this->success.resize(_size298); - uint32_t _i302; - for (_i302 = 0; _i302 < _size298; ++_i302) - { - xfer += iprot->readString(this->success[_i302]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter303; - for (_iter303 = this->success.begin(); _iter303 != this->success.end(); ++_iter303) - { - xfer += oprot->writeString((*_iter303)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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; - 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 _size304; - apache::thrift::protocol::TType _etype307; - iprot->readListBegin(_etype307, _size304); - (*(this->success)).resize(_size304); - uint32_t _i308; - for (_i308 = 0; _i308 < _size304; ++_i308) - { - xfer += iprot->readString((*(this->success))[_i308]); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -void ThriftHiveMetastoreClient::create_database(const Database& database) -{ - send_create_database(database); - recv_create_database(); -} - -void ThriftHiveMetastoreClient::send_create_database(const Database& database) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_create_database() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("create_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_create_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) -{ - send_get_database(name); - recv_get_database(_return); -} - -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_database_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); -} - -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) -{ - send_drop_database(name, deleteData); - recv_drop_database(); -} - -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); - - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_drop_database() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("drop_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_drop_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) -{ - send_get_databases(pattern); - recv_get_databases(_return); -} - -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_databases") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) -{ - send_get_all_databases(); - recv_get_all_databases(_return); -} - -void ThriftHiveMetastoreClient::send_get_all_databases() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_databases_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - 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_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_all_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) -{ - send_get_type(name); - recv_get_type(_return); -} - -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::create_type(const Type& type) -{ - send_create_type(type); - return recv_create_type(); -} - -void ThriftHiveMetastoreClient::send_create_type(const Type& type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool ThriftHiveMetastoreClient::recv_create_type() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("create_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - bool _return; - ThriftHiveMetastore_create_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) -{ - send_drop_type(type); - return recv_drop_type(); -} - -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool ThriftHiveMetastoreClient::recv_drop_type() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("drop_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_get_type_all(name); - recv_get_type_all(_return); -} - -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); - - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_type_all") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_type_all_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.o2) { - throw result.o2; - } - 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) -{ - send_get_fields(db_name, table_name); - recv_get_fields(_return); -} - -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); - - ThriftHiveMetastore_get_fields_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_fields(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("get_fields") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_fields_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - 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) -{ - send_get_schema(db_name, table_name); - recv_get_schema(_return); -} - -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); - - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_schema(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("get_schema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_schema_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); -} - -void ThriftHiveMetastoreClient::create_table(const Table& tbl) -{ - send_create_table(tbl); - recv_create_table(); -} - -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_create_table() -{ - - 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("create_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_create_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; -} - -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) -{ - send_drop_table(dbname, name, deleteData); - recv_drop_table(); -} - -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); - - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_drop_table() -{ - - 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("drop_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_drop_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) -{ - send_get_tables(db_name, pattern); - recv_get_tables(_return); -} - -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); - - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_tables(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("get_tables") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) -{ - send_get_all_tables(db_name); - recv_get_all_tables(_return); -} - -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); - - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_all_tables(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("get_all_tables") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_all_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) -{ - send_get_table(dbname, tbl_name); - recv_get_table(_return); -} - -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); - - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_table(Table& _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("get_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_table_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); -} - -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); - - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_alter_table() -{ - - 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("alter_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_alter_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) -{ - send_add_partition(new_part); - recv_add_partition(_return); -} - -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _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("add_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_add_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - 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) -{ - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); -} - -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); - - ThriftHiveMetastore_append_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _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("append_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_append_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - 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) -{ - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); -} - -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _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("append_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_append_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - 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) -{ - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); -} - -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); - - ThriftHiveMetastore_drop_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition() -{ - - 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("drop_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); -} - -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); - - ThriftHiveMetastore_drop_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() -{ - - 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("drop_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_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) -{ - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); -} - -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); - - ThriftHiveMetastore_get_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _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("get_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); -} - -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); - - ThriftHiveMetastore_get_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _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("get_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_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); - - ThriftHiveMetastore_get_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions(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("get_partitions") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions 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) -{ - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); -} - -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); - - ThriftHiveMetastore_get_partition_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_names(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("get_partition_names") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partition_names_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.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) -{ - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); -} - -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); - - ThriftHiveMetastore_get_partitions_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_ps(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("get_partitions_ps") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partitions_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_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) -{ - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); -} - -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); - - ThriftHiveMetastore_get_partition_names_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(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("get_partition_names_ps") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partition_names_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) -{ - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(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("get_partitions_by_filter") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_partitions_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); -} - -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_alter_partition() -{ - - 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("alter_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_alter_partition_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) -{ - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); -} - -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); - - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_config_value(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("get_config_value") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_config_value_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); -} - -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) -{ - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); -} - -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); - - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(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("partition_name_to_vals") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_partition_name_to_vals_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); -} - -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) -{ - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); -} - -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("partition_name_to_spec") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_partition_name_to_spec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); -} - -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) -{ - send_add_index(new_index, index_table); - recv_add_index(_return); -} - -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_add_index(Index& _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("add_index") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_add_index_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); -} - -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_alter_index() -{ - - 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("alter_index") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_alter_index_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); -} - -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() -{ - - 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("drop_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_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) -{ - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); -} - -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); - - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _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("get_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); -} - -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); - - ThriftHiveMetastore_get_indexes_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_indexes(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("get_indexes") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - 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) -{ - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); -} - -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); - - ThriftHiveMetastore_get_index_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreClient::recv_get_index_names(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("get_index_names") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_names_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.o2) { - throw result.o2; - } - 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) { - - 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 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); - } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; -} - -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); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_create_database_result result; - try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_database_result result; - try { - iface_->get_database(result.success, args.name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_drop_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_database_result result; - try { - iface_->drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_databases_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_databases_result result; - try { - iface_->get_databases(result.success, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_all_databases_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_all_databases_result result; - try { - iface_->get_all_databases(result.success); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_type_result result; - try { - iface_->get_type(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_create_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_create_type_result result; - try { - result.success = iface_->create_type(args.type); - result.__isset.success = true; - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_drop_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_type_result result; - try { - result.success = iface_->drop_type(args.type); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_type_all_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_type_all_result result; - try { - iface_->get_type_all(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_fields_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_fields_result result; - try { - iface_->get_fields(result.success, args.db_name, args.table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_schema_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_schema_result result; - try { - iface_->get_schema(result.success, args.db_name, args.table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_create_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_create_table_result result; - try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_drop_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_table_result result; - try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o3) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_tables_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_tables_result result; - try { - iface_->get_tables(result.success, args.db_name, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_all_tables_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_all_tables_result result; - try { - iface_->get_all_tables(result.success, args.db_name); - result.__isset.success = true; - } catch (MetaException &o1) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_table_result result; - try { - iface_->get_table(result.success, args.dbname, args.tbl_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_alter_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_alter_table_result result; - try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_add_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_add_partition_result result; - try { - iface_->add_partition(result.success, args.new_part); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_append_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_append_partition_result result; - try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_append_partition_by_name_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_append_partition_by_name_result result; - try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_drop_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_partition_result result; - try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_drop_partition_by_name_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_partition_by_name_result result; - try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partition_result result; - try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partition_by_name_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partition_by_name_result result; - try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partitions_result result; - try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partition_names_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partition_names_result result; - try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o2) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partitions_ps_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partitions_ps_result result; - try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partition_names_ps_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partition_names_ps_result result; - try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_partitions_by_filter_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_partitions_by_filter_result result; - try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_alter_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_alter_partition_result result; - try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_config_value_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_config_value_result result; - try { - iface_->get_config_value(result.success, args.name, args.defaultValue); - result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_partition_name_to_vals_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_partition_name_to_vals_result result; - try { - iface_->partition_name_to_vals(result.success, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_partition_name_to_spec_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_partition_name_to_spec_result result; - try { - iface_->partition_name_to_spec(result.success, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_add_index_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_add_index_result result; - try { - iface_->add_index(result.success, args.new_index, args.index_table); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - ThriftHiveMetastore_alter_index_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_alter_index_result result; - try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("alter_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) -{ - ThriftHiveMetastore_drop_index_by_name_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_drop_index_by_name_result result; - try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_index_by_name_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_index_by_name_result result; - try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - 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(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_indexes_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_indexes_result result; - try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHiveMetastore_get_index_names_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHiveMetastore_get_index_names_result result; - try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); - result.__isset.success = true; - } catch (MetaException &o2) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -}}} // namespace - diff --git metastore/src/gen-cpp/ThriftHiveMetastore.h metastore/src/gen-cpp/ThriftHiveMetastore.h deleted file mode 100644 index d7f3bc3..0000000 --- metastore/src/gen-cpp/ThriftHiveMetastore.h +++ /dev/null @@ -1,5158 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef ThriftHiveMetastore_H -#define ThriftHiveMetastore_H - -#include -#include "hive_metastore_types.h" -#include "FacebookService.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf { - public: - virtual ~ThriftHiveMetastoreIf() {} - virtual void create_database(const Database& database) = 0; - virtual void get_database(Database& _return, const std::string& name) = 0; - virtual void drop_database(const std::string& name, const bool deleteData) = 0; - virtual void get_databases(std::vector & _return, const std::string& pattern) = 0; - virtual void get_all_databases(std::vector & _return) = 0; - virtual void get_type(Type& _return, const std::string& name) = 0; - virtual bool create_type(const Type& type) = 0; - virtual bool drop_type(const std::string& type) = 0; - virtual void get_type_all(std::map & _return, const std::string& name) = 0; - virtual void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; - virtual void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; - virtual void create_table(const Table& tbl) = 0; - virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0; - virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0; - virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; - virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; - virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0; - virtual void add_partition(Partition& _return, const Partition& new_part) = 0; - virtual void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; - virtual void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; - virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; - virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; - virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; - virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; - virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; - virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; - virtual void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; - virtual void 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) = 0; - virtual void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) = 0; - virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; - virtual void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) = 0; - virtual void partition_name_to_vals(std::vector & _return, const std::string& part_name) = 0; - virtual void partition_name_to_spec(std::map & _return, const std::string& part_name) = 0; - virtual void add_index(Index& _return, const Index& new_index, const Table& index_table) = 0; - virtual void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) = 0; - virtual bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) = 0; - virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; - virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; - virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; -}; - -class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { - public: - virtual ~ThriftHiveMetastoreNull() {} - void create_database(const Database& /* database */) { - return; - } - void get_database(Database& /* _return */, const std::string& /* name */) { - return; - } - void drop_database(const std::string& /* name */, const bool /* deleteData */) { - return; - } - void get_databases(std::vector & /* _return */, const std::string& /* pattern */) { - return; - } - void get_all_databases(std::vector & /* _return */) { - return; - } - void get_type(Type& /* _return */, const std::string& /* name */) { - return; - } - bool create_type(const Type& /* type */) { - bool _return = false; - return _return; - } - bool drop_type(const std::string& /* type */) { - bool _return = false; - return _return; - } - void get_type_all(std::map & /* _return */, const std::string& /* name */) { - return; - } - void get_fields(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { - return; - } - void get_schema(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { - return; - } - void create_table(const Table& /* tbl */) { - return; - } - void drop_table(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */) { - return; - } - void get_tables(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) { - return; - } - void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { - return; - } - void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { - return; - } - void alter_table(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */) { - return; - } - void add_partition(Partition& /* _return */, const Partition& /* new_part */) { - return; - } - void append_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { - return; - } - void append_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { - return; - } - bool drop_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - bool drop_partition_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { - return; - } - void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { - return; - } - void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { - return; - } - void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { - return; - } - void get_partitions_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { - return; - } - void 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 */) { - return; - } - void get_partitions_by_filter(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */, const int16_t /* max_parts */) { - return; - } - void alter_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */) { - return; - } - void get_config_value(std::string& /* _return */, const std::string& /* name */, const std::string& /* defaultValue */) { - return; - } - void partition_name_to_vals(std::vector & /* _return */, const std::string& /* part_name */) { - return; - } - void partition_name_to_spec(std::map & /* _return */, const std::string& /* part_name */) { - return; - } - void add_index(Index& /* _return */, const Index& /* new_index */, const Table& /* index_table */) { - return; - } - void alter_index(const std::string& /* dbname */, const std::string& /* base_tbl_name */, const std::string& /* idx_name */, const Index& /* new_idx */) { - return; - } - bool drop_index_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - void get_index_by_name(Index& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */) { - return; - } - void get_indexes(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { - return; - } - void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { - return; - } -}; - -class ThriftHiveMetastore_create_database_args { - public: - - ThriftHiveMetastore_create_database_args() { - } - - virtual ~ThriftHiveMetastore_create_database_args() throw() {} - - Database database; - - struct __isset { - __isset() : database(false) {} - bool database; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const - { - if (!(database == rhs.database)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_database_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_database_pargs() throw() {} - - const Database* database; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_create_database_result { - public: - - ThriftHiveMetastore_create_database_result() { - } - - virtual ~ThriftHiveMetastore_create_database_result() throw() {} - - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_database_presult { - public: - - - virtual ~ThriftHiveMetastore_create_database_presult() throw() {} - - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_database_args { - public: - - ThriftHiveMetastore_get_database_args() : name("") { - } - - virtual ~ThriftHiveMetastore_get_database_args() throw() {} - - std::string name; - - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_database_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_database_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_database_pargs() throw() {} - - const std::string* name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_database_result { - public: - - ThriftHiveMetastore_get_database_result() { - } - - virtual ~ThriftHiveMetastore_get_database_result() throw() {} - - Database success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_database_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_database_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_database_presult { - public: - - - virtual ~ThriftHiveMetastore_get_database_presult() throw() {} - - Database* success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_database_args { - public: - - ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_database_args() throw() {} - - std::string name; - bool deleteData; - - struct __isset { - __isset() : name(false), deleteData(false) {} - bool name; - bool deleteData; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_database_pargs() throw() {} - - const std::string* name; - const bool* deleteData; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_database_result { - public: - - ThriftHiveMetastore_drop_database_result() { - } - - virtual ~ThriftHiveMetastore_drop_database_result() throw() {} - - NoSuchObjectException o1; - InvalidOperationException o2; - MetaException o3; - - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_database_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_database_presult() throw() {} - - NoSuchObjectException o1; - InvalidOperationException o2; - MetaException o3; - - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_databases_args { - public: - - ThriftHiveMetastore_get_databases_args() : pattern("") { - } - - virtual ~ThriftHiveMetastore_get_databases_args() throw() {} - - std::string pattern; - - struct __isset { - __isset() : pattern(false) {} - bool pattern; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const - { - if (!(pattern == rhs.pattern)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_databases_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_databases_pargs() throw() {} - - const std::string* pattern; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_databases_result { - public: - - ThriftHiveMetastore_get_databases_result() { - } - - virtual ~ThriftHiveMetastore_get_databases_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_databases_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_databases_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_databases_presult { - public: - - - virtual ~ThriftHiveMetastore_get_databases_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_all_databases_args { - public: - - ThriftHiveMetastore_get_all_databases_args() { - } - - virtual ~ThriftHiveMetastore_get_all_databases_args() throw() {} - - - bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_all_databases_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_all_databases_result { - public: - - ThriftHiveMetastore_get_all_databases_result() { - } - - virtual ~ThriftHiveMetastore_get_all_databases_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_all_databases_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_databases_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_type_args { - public: - - ThriftHiveMetastore_get_type_args() : name("") { - } - - virtual ~ThriftHiveMetastore_get_type_args() throw() {} - - std::string name; - - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_type_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_type_pargs() throw() {} - - const std::string* name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_type_result { - public: - - ThriftHiveMetastore_get_type_result() { - } - - virtual ~ThriftHiveMetastore_get_type_result() throw() {} - - Type success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_type_presult { - public: - - - virtual ~ThriftHiveMetastore_get_type_presult() throw() {} - - Type* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_create_type_args { - public: - - ThriftHiveMetastore_create_type_args() { - } - - virtual ~ThriftHiveMetastore_create_type_args() throw() {} - - Type type; - - struct __isset { - __isset() : type(false) {} - bool type; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_type_args & rhs) const - { - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_type_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_type_pargs() throw() {} - - const Type* type; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_create_type_result { - public: - - ThriftHiveMetastore_create_type_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_create_type_result() throw() {} - - bool success; - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_type_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_type_presult { - public: - - - virtual ~ThriftHiveMetastore_create_type_presult() throw() {} - - bool* success; - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_type_args { - public: - - ThriftHiveMetastore_drop_type_args() : type("") { - } - - virtual ~ThriftHiveMetastore_drop_type_args() throw() {} - - std::string type; - - struct __isset { - __isset() : type(false) {} - bool type; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_type_args & rhs) const - { - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_type_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_type_pargs() throw() {} - - const std::string* type; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_type_result { - public: - - ThriftHiveMetastore_drop_type_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_type_result() throw() {} - - bool success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_type_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_type_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_type_presult() throw() {} - - bool* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_type_all_args { - public: - - ThriftHiveMetastore_get_type_all_args() : name("") { - } - - virtual ~ThriftHiveMetastore_get_type_all_args() throw() {} - - std::string name; - - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_type_all_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_all_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_type_all_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_type_all_pargs() throw() {} - - const std::string* name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_type_all_result { - public: - - ThriftHiveMetastore_get_type_all_result() { - } - - virtual ~ThriftHiveMetastore_get_type_all_result() throw() {} - - std::map success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_type_all_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_all_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_type_all_presult { - public: - - - virtual ~ThriftHiveMetastore_get_type_all_presult() throw() {} - - std::map * success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_fields_args { - public: - - ThriftHiveMetastore_get_fields_args() : db_name(""), table_name("") { - } - - virtual ~ThriftHiveMetastore_get_fields_args() throw() {} - - std::string db_name; - std::string table_name; - - struct __isset { - __isset() : db_name(false), table_name(false) {} - bool db_name; - bool table_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_fields_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_fields_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_fields_pargs() throw() {} - - const std::string* db_name; - const std::string* table_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_fields_result { - public: - - ThriftHiveMetastore_get_fields_result() { - } - - virtual ~ThriftHiveMetastore_get_fields_result() throw() {} - - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_fields_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_fields_presult { - public: - - - virtual ~ThriftHiveMetastore_get_fields_presult() throw() {} - - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_schema_args { - public: - - ThriftHiveMetastore_get_schema_args() : db_name(""), table_name("") { - } - - virtual ~ThriftHiveMetastore_get_schema_args() throw() {} - - std::string db_name; - std::string table_name; - - struct __isset { - __isset() : db_name(false), table_name(false) {} - bool db_name; - bool table_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_schema_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_schema_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_schema_pargs() throw() {} - - const std::string* db_name; - const std::string* table_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_schema_result { - public: - - ThriftHiveMetastore_get_schema_result() { - } - - virtual ~ThriftHiveMetastore_get_schema_result() throw() {} - - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_schema_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_schema_presult { - public: - - - virtual ~ThriftHiveMetastore_get_schema_presult() throw() {} - - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_create_table_args { - public: - - ThriftHiveMetastore_create_table_args() { - } - - virtual ~ThriftHiveMetastore_create_table_args() throw() {} - - Table tbl; - - struct __isset { - __isset() : tbl(false) {} - bool tbl; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_table_args & rhs) const - { - if (!(tbl == rhs.tbl)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_table_pargs() throw() {} - - const Table* tbl; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_create_table_result { - public: - - ThriftHiveMetastore_create_table_result() { - } - - virtual ~ThriftHiveMetastore_create_table_result() throw() {} - - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - struct __isset { - __isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1; - bool o2; - bool o3; - bool o4; - } __isset; - - bool operator == (const ThriftHiveMetastore_create_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_create_table_presult { - public: - - - virtual ~ThriftHiveMetastore_create_table_presult() throw() {} - - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - struct __isset { - __isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1; - bool o2; - bool o3; - bool o4; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_table_args { - public: - - ThriftHiveMetastore_drop_table_args() : dbname(""), name(""), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_table_args() throw() {} - - std::string dbname; - std::string name; - bool deleteData; - - struct __isset { - __isset() : dbname(false), name(false), deleteData(false) {} - bool dbname; - bool name; - bool deleteData; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(name == rhs.name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_table_pargs() throw() {} - - const std::string* dbname; - const std::string* name; - const bool* deleteData; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_table_result { - public: - - ThriftHiveMetastore_drop_table_result() { - } - - virtual ~ThriftHiveMetastore_drop_table_result() throw() {} - - NoSuchObjectException o1; - MetaException o3; - - struct __isset { - __isset() : o1(false), o3(false) {} - bool o1; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_table_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_table_presult() throw() {} - - NoSuchObjectException o1; - MetaException o3; - - struct __isset { - __isset() : o1(false), o3(false) {} - bool o1; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_tables_args { - public: - - ThriftHiveMetastore_get_tables_args() : db_name(""), pattern("") { - } - - virtual ~ThriftHiveMetastore_get_tables_args() throw() {} - - std::string db_name; - std::string pattern; - - struct __isset { - __isset() : db_name(false), pattern(false) {} - bool db_name; - bool pattern; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_tables_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(pattern == rhs.pattern)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_tables_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_tables_pargs() throw() {} - - const std::string* db_name; - const std::string* pattern; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_tables_result { - public: - - ThriftHiveMetastore_get_tables_result() { - } - - virtual ~ThriftHiveMetastore_get_tables_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_tables_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_tables_presult { - public: - - - virtual ~ThriftHiveMetastore_get_tables_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_all_tables_args { - public: - - ThriftHiveMetastore_get_all_tables_args() : db_name("") { - } - - virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {} - - std::string db_name; - - struct __isset { - __isset() : db_name(false) {} - bool db_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_all_tables_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw() {} - - const std::string* db_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_all_tables_result { - public: - - ThriftHiveMetastore_get_all_tables_result() { - } - - virtual ~ThriftHiveMetastore_get_all_tables_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_all_tables_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_tables_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_table_args { - public: - - ThriftHiveMetastore_get_table_args() : dbname(""), tbl_name("") { - } - - virtual ~ThriftHiveMetastore_get_table_args() throw() {} - - std::string dbname; - std::string tbl_name; - - struct __isset { - __isset() : dbname(false), tbl_name(false) {} - bool dbname; - bool tbl_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_pargs() throw() {} - - const std::string* dbname; - const std::string* tbl_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_table_result { - public: - - ThriftHiveMetastore_get_table_result() { - } - - virtual ~ThriftHiveMetastore_get_table_result() throw() {} - - Table success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_table_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_table_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_presult() throw() {} - - Table* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_alter_table_args { - public: - - ThriftHiveMetastore_alter_table_args() : dbname(""), tbl_name("") { - } - - virtual ~ThriftHiveMetastore_alter_table_args() throw() {} - - std::string dbname; - 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; - - bool operator == (const ThriftHiveMetastore_alter_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_tbl == rhs.new_tbl)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_alter_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_table_pargs() throw() {} - - const std::string* dbname; - const std::string* tbl_name; - const Table* new_tbl; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_alter_table_result { - public: - - ThriftHiveMetastore_alter_table_result() { - } - - virtual ~ThriftHiveMetastore_alter_table_result() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_alter_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_alter_table_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_table_presult() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_add_partition_args { - public: - - ThriftHiveMetastore_add_partition_args() { - } - - virtual ~ThriftHiveMetastore_add_partition_args() throw() {} - - Partition new_part; - - struct __isset { - __isset() : new_part(false) {} - bool new_part; - } __isset; - - bool operator == (const ThriftHiveMetastore_add_partition_args & rhs) const - { - if (!(new_part == rhs.new_part)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_add_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partition_pargs() throw() {} - - const Partition* new_part; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_add_partition_result { - public: - - ThriftHiveMetastore_add_partition_result() { - } - - virtual ~ThriftHiveMetastore_add_partition_result() throw() {} - - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_add_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_add_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partition_presult() throw() {} - - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_append_partition_args { - public: - - ThriftHiveMetastore_append_partition_args() : db_name(""), tbl_name("") { - } - - virtual ~ThriftHiveMetastore_append_partition_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_append_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_append_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_append_partition_result { - public: - - ThriftHiveMetastore_append_partition_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_result() throw() {} - - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_append_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_append_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_presult() throw() {} - - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_append_partition_by_name_args { - public: - - ThriftHiveMetastore_append_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_append_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_append_partition_by_name_result { - public: - - ThriftHiveMetastore_append_partition_by_name_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_result() throw() {} - - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_append_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_presult() throw() {} - - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_partition_args { - public: - - ThriftHiveMetastore_drop_partition_args() : db_name(""), tbl_name(""), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_drop_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const bool* deleteData; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_partition_result { - public: - - ThriftHiveMetastore_drop_partition_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_result() throw() {} - - bool success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_presult() throw() {} - - bool* success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_partition_by_name_args { - public: - - ThriftHiveMetastore_drop_partition_by_name_args() : db_name(""), tbl_name(""), part_name(""), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const bool* deleteData; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_partition_by_name_result { - public: - - ThriftHiveMetastore_drop_partition_by_name_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_result() throw() {} - - bool success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_presult() throw() {} - - bool* success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partition_args { - public: - - ThriftHiveMetastore_get_partition_args() : db_name(""), tbl_name("") { - } - - virtual ~ThriftHiveMetastore_get_partition_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partition_result { - public: - - ThriftHiveMetastore_get_partition_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_result() throw() {} - - Partition success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_presult() throw() {} - - Partition* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partition_by_name_args { - public: - - ThriftHiveMetastore_get_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { - } - - virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_by_name_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partition_by_name_result { - public: - - ThriftHiveMetastore_get_partition_by_name_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_by_name_result() throw() {} - - Partition success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_by_name_presult() throw() {} - - Partition* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partitions_args { - public: - - ThriftHiveMetastore_get_partitions_args() : db_name(""), tbl_name(""), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partitions_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_parts; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partitions_result { - public: - - ThriftHiveMetastore_get_partitions_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_result() throw() {} - - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partitions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_presult() throw() {} - - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partition_names_args { - public: - - ThriftHiveMetastore_get_partition_names_args() : db_name(""), tbl_name(""), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partition_names_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partition_names_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_parts; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partition_names_result { - public: - - ThriftHiveMetastore_get_partition_names_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_names_result() throw() {} - - std::vector success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partition_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_presult() throw() {} - - std::vector * success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partitions_ps_args { - public: - - ThriftHiveMetastore_get_partitions_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_ps_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const int16_t* max_parts; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partitions_ps_result { - public: - - ThriftHiveMetastore_get_partitions_ps_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_ps_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_ps_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partition_names_ps_args { - public: - - ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_names_ps_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const int16_t* max_parts; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partition_names_ps_result { - public: - - ThriftHiveMetastore_get_partition_names_ps_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partition_names_ps_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_ps_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_partitions_by_filter_args { - public: - - ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(""), tbl_name(""), filter(""), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(filter == rhs.filter)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_by_filter_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* filter; - const int16_t* max_parts; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_partitions_by_filter_result { - public: - - ThriftHiveMetastore_get_partitions_by_filter_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_result() throw() {} - - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_partitions_by_filter_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_presult() throw() {} - - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_alter_partition_args { - public: - - ThriftHiveMetastore_alter_partition_args() : db_name(""), tbl_name("") { - } - - virtual ~ThriftHiveMetastore_alter_partition_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_alter_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_part == rhs.new_part)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_alter_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const Partition* new_part; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_alter_partition_result { - public: - - ThriftHiveMetastore_alter_partition_result() { - } - - virtual ~ThriftHiveMetastore_alter_partition_result() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_alter_partition_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_alter_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_presult() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_config_value_args { - public: - - ThriftHiveMetastore_get_config_value_args() : name(""), defaultValue("") { - } - - virtual ~ThriftHiveMetastore_get_config_value_args() throw() {} - - std::string name; - std::string defaultValue; - - struct __isset { - __isset() : name(false), defaultValue(false) {} - bool name; - bool defaultValue; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_config_value_args & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(defaultValue == rhs.defaultValue)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_config_value_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_config_value_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_config_value_pargs() throw() {} - - const std::string* name; - const std::string* defaultValue; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_config_value_result { - public: - - ThriftHiveMetastore_get_config_value_result() : success("") { - } - - virtual ~ThriftHiveMetastore_get_config_value_result() throw() {} - - std::string success; - ConfigValSecurityException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_config_value_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_config_value_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_config_value_presult { - public: - - - virtual ~ThriftHiveMetastore_get_config_value_presult() throw() {} - - std::string* success; - ConfigValSecurityException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_partition_name_to_vals_args { - public: - - ThriftHiveMetastore_partition_name_to_vals_args() : part_name("") { - } - - virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw() {} - - std::string part_name; - - struct __isset { - __isset() : part_name(false) {} - bool part_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_partition_name_to_vals_args & rhs) const - { - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_vals_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_partition_name_to_vals_pargs { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_vals_pargs() throw() {} - - const std::string* part_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_partition_name_to_vals_result { - public: - - ThriftHiveMetastore_partition_name_to_vals_result() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_vals_result() throw() {} - - std::vector success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_partition_name_to_vals_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_vals_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_partition_name_to_vals_presult { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_vals_presult() throw() {} - - std::vector * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_partition_name_to_spec_args { - public: - - ThriftHiveMetastore_partition_name_to_spec_args() : part_name("") { - } - - virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw() {} - - std::string part_name; - - struct __isset { - __isset() : part_name(false) {} - bool part_name; - } __isset; - - bool operator == (const ThriftHiveMetastore_partition_name_to_spec_args & rhs) const - { - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_spec_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_partition_name_to_spec_pargs { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_spec_pargs() throw() {} - - const std::string* part_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_partition_name_to_spec_result { - public: - - ThriftHiveMetastore_partition_name_to_spec_result() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_spec_result() throw() {} - - std::map success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - bool operator == (const ThriftHiveMetastore_partition_name_to_spec_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_spec_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_partition_name_to_spec_presult { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_spec_presult() throw() {} - - std::map * success; - MetaException o1; - - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_add_index_args { - public: - - ThriftHiveMetastore_add_index_args() { - } - - virtual ~ThriftHiveMetastore_add_index_args() throw() {} - - Index new_index; - Table index_table; - - struct __isset { - __isset() : new_index(false), index_table(false) {} - bool new_index; - bool index_table; - } __isset; - - bool operator == (const ThriftHiveMetastore_add_index_args & rhs) const - { - if (!(new_index == rhs.new_index)) - return false; - if (!(index_table == rhs.index_table)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_index_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_add_index_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_index_pargs() throw() {} - - const Index* new_index; - const Table* index_table; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_add_index_result { - public: - - ThriftHiveMetastore_add_index_result() { - } - - virtual ~ThriftHiveMetastore_add_index_result() throw() {} - - Index success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - bool operator == (const ThriftHiveMetastore_add_index_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_index_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_add_index_presult { - public: - - - virtual ~ThriftHiveMetastore_add_index_presult() throw() {} - - Index* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_alter_index_args { - public: - - ThriftHiveMetastore_alter_index_args() : dbname(""), base_tbl_name(""), idx_name("") { - } - - virtual ~ThriftHiveMetastore_alter_index_args() throw() {} - - std::string dbname; - std::string base_tbl_name; - std::string idx_name; - Index new_idx; - - struct __isset { - __isset() : dbname(false), base_tbl_name(false), idx_name(false), new_idx(false) {} - bool dbname; - bool base_tbl_name; - bool idx_name; - bool new_idx; - } __isset; - - bool operator == (const ThriftHiveMetastore_alter_index_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(base_tbl_name == rhs.base_tbl_name)) - return false; - if (!(idx_name == rhs.idx_name)) - return false; - if (!(new_idx == rhs.new_idx)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_index_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_index_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_alter_index_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_index_pargs() throw() {} - - const std::string* dbname; - const std::string* base_tbl_name; - const std::string* idx_name; - const Index* new_idx; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_alter_index_result { - public: - - ThriftHiveMetastore_alter_index_result() { - } - - virtual ~ThriftHiveMetastore_alter_index_result() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_alter_index_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_index_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_index_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_alter_index_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_index_presult() throw() {} - - InvalidOperationException o1; - MetaException o2; - - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_drop_index_by_name_args { - public: - - ThriftHiveMetastore_drop_index_by_name_args() : db_name(""), tbl_name(""), index_name(""), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw() {} - - std::string db_name; - std::string tbl_name; - 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; - - bool operator == (const ThriftHiveMetastore_drop_index_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(index_name == rhs.index_name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_index_by_name_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_index_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_index_by_name_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* index_name; - const bool* deleteData; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_drop_index_by_name_result { - public: - - ThriftHiveMetastore_drop_index_by_name_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_index_by_name_result() throw() {} - - bool success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_drop_index_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_index_by_name_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_drop_index_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_index_by_name_presult() throw() {} - - bool* success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_index_by_name_args { - public: - - ThriftHiveMetastore_get_index_by_name_args() : db_name(""), tbl_name(""), index_name("") { - } - - virtual ~ThriftHiveMetastore_get_index_by_name_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_index_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(index_name == rhs.index_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_by_name_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_index_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_index_by_name_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const std::string* index_name; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_index_by_name_result { - public: - - ThriftHiveMetastore_get_index_by_name_result() { - } - - virtual ~ThriftHiveMetastore_get_index_by_name_result() throw() {} - - Index success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_index_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_by_name_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_index_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_get_index_by_name_presult() throw() {} - - Index* success; - MetaException o1; - NoSuchObjectException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_indexes_args { - public: - - ThriftHiveMetastore_get_indexes_args() : db_name(""), tbl_name(""), max_indexes(-1) { - } - - virtual ~ThriftHiveMetastore_get_indexes_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_indexes_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_indexes == rhs.max_indexes)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_indexes_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_indexes_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_indexes_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_indexes; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_indexes_result { - public: - - ThriftHiveMetastore_get_indexes_result() { - } - - virtual ~ThriftHiveMetastore_get_indexes_result() throw() {} - - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_indexes_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_indexes_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_indexes_presult { - public: - - - virtual ~ThriftHiveMetastore_get_indexes_presult() throw() {} - - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastore_get_index_names_args { - public: - - ThriftHiveMetastore_get_index_names_args() : db_name(""), tbl_name(""), max_indexes(-1) { - } - - virtual ~ThriftHiveMetastore_get_index_names_args() throw() {} - - std::string db_name; - 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; - - bool operator == (const ThriftHiveMetastore_get_index_names_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_indexes == rhs.max_indexes)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_names_args &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_index_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_index_names_pargs() throw() {} - - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_indexes; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHiveMetastore_get_index_names_result { - public: - - ThriftHiveMetastore_get_index_names_result() { - } - - virtual ~ThriftHiveMetastore_get_index_names_result() throw() {} - - std::vector success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - bool operator == (const ThriftHiveMetastore_get_index_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_names_result &rhs) const { - return !(*this == rhs); - } - - 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; - -}; - -class ThriftHiveMetastore_get_index_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_index_names_presult() throw() {} - - std::vector * success; - MetaException o2; - - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { - public: - ThriftHiveMetastoreClient(boost::shared_ptr prot) : - facebook::fb303::FacebookServiceClient(prot, prot) {} - ThriftHiveMetastoreClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : - facebook::fb303::FacebookServiceClient(iprot, oprot) {} - boost::shared_ptr getInputProtocol() { - return piprot_; - } - boost::shared_ptr getOutputProtocol() { - return poprot_; - } - void create_database(const Database& database); - void send_create_database(const Database& database); - void recv_create_database(); - void get_database(Database& _return, const std::string& name); - void send_get_database(const std::string& name); - void recv_get_database(Database& _return); - void drop_database(const std::string& name, const bool deleteData); - void send_drop_database(const std::string& name, const bool deleteData); - void recv_drop_database(); - void get_databases(std::vector & _return, const std::string& pattern); - void send_get_databases(const std::string& pattern); - void recv_get_databases(std::vector & _return); - void get_all_databases(std::vector & _return); - void send_get_all_databases(); - void recv_get_all_databases(std::vector & _return); - void get_type(Type& _return, const std::string& name); - void send_get_type(const std::string& name); - void recv_get_type(Type& _return); - bool create_type(const Type& type); - void send_create_type(const Type& type); - bool recv_create_type(); - bool drop_type(const std::string& type); - void send_drop_type(const std::string& type); - bool recv_drop_type(); - void get_type_all(std::map & _return, const std::string& name); - void send_get_type_all(const std::string& name); - void recv_get_type_all(std::map & _return); - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_fields(const std::string& db_name, const std::string& table_name); - void recv_get_fields(std::vector & _return); - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_schema(const std::string& db_name, const std::string& table_name); - void recv_get_schema(std::vector & _return); - void create_table(const Table& tbl); - void send_create_table(const Table& tbl); - void recv_create_table(); - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void recv_drop_table(); - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); - void send_get_tables(const std::string& db_name, const std::string& pattern); - void recv_get_tables(std::vector & _return); - void get_all_tables(std::vector & _return, const std::string& db_name); - void send_get_all_tables(const std::string& db_name); - void recv_get_all_tables(std::vector & _return); - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); - void send_get_table(const std::string& dbname, const std::string& tbl_name); - void recv_get_table(Table& _return); - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void recv_alter_table(); - void add_partition(Partition& _return, const Partition& new_part); - void send_add_partition(const Partition& new_part); - void recv_add_partition(Partition& _return); - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_append_partition(Partition& _return); - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_append_partition_by_name(Partition& _return); - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - bool recv_drop_partition(); - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - bool recv_drop_partition_by_name(); - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_get_partition(Partition& _return); - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_get_partition_by_name(Partition& _return); - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partitions(std::vector & _return); - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partition_names(std::vector & _return); - void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partitions_ps(std::vector & _return); - void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partition_names_ps(std::vector & _return); - void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void recv_get_partitions_by_filter(std::vector & _return); - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void recv_alter_partition(); - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); - void send_get_config_value(const std::string& name, const std::string& defaultValue); - void recv_get_config_value(std::string& _return); - void partition_name_to_vals(std::vector & _return, const std::string& part_name); - void send_partition_name_to_vals(const std::string& part_name); - void recv_partition_name_to_vals(std::vector & _return); - void partition_name_to_spec(std::map & _return, const std::string& part_name); - void send_partition_name_to_spec(const std::string& part_name); - void recv_partition_name_to_spec(std::map & _return); - void add_index(Index& _return, const Index& new_index, const Table& index_table); - void send_add_index(const Index& new_index, const Table& index_table); - void recv_add_index(Index& _return); - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void recv_alter_index(); - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - bool recv_drop_index_by_name(); - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void recv_get_index_by_name(Index& _return); - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_indexes(std::vector & _return); - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_index_names(std::vector & _return); -}; - -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); - 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_alter_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), - iface_(iface) { - processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; - processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; - processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database; - processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases; - processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases; - processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type; - processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type; - processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type; - processMap_["get_type_all"] = &ThriftHiveMetastoreProcessor::process_get_type_all; - processMap_["get_fields"] = &ThriftHiveMetastoreProcessor::process_get_fields; - processMap_["get_schema"] = &ThriftHiveMetastoreProcessor::process_get_schema; - processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table; - processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table; - processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables; - processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; - processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; - processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; - processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; - processMap_["append_partition"] = &ThriftHiveMetastoreProcessor::process_append_partition; - processMap_["append_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name; - processMap_["drop_partition"] = &ThriftHiveMetastoreProcessor::process_drop_partition; - processMap_["drop_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name; - processMap_["get_partition"] = &ThriftHiveMetastoreProcessor::process_get_partition; - processMap_["get_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_get_partition_by_name; - processMap_["get_partitions"] = &ThriftHiveMetastoreProcessor::process_get_partitions; - processMap_["get_partition_names"] = &ThriftHiveMetastoreProcessor::process_get_partition_names; - processMap_["get_partitions_ps"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps; - processMap_["get_partition_names_ps"] = &ThriftHiveMetastoreProcessor::process_get_partition_names_ps; - processMap_["get_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_filter; - processMap_["alter_partition"] = &ThriftHiveMetastoreProcessor::process_alter_partition; - processMap_["get_config_value"] = &ThriftHiveMetastoreProcessor::process_get_config_value; - processMap_["partition_name_to_vals"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_vals; - processMap_["partition_name_to_spec"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_spec; - processMap_["add_index"] = &ThriftHiveMetastoreProcessor::process_add_index; - processMap_["alter_index"] = &ThriftHiveMetastoreProcessor::process_alter_index; - processMap_["drop_index_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_index_by_name; - processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; - processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; - processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; - } - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); - virtual ~ThriftHiveMetastoreProcessor() {} -}; - -class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceMultiface { - public: - ThriftHiveMetastoreMultiface(std::vector >& ifaces) : ifaces_(ifaces) { - std::vector >::iterator iter; - for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - facebook::fb303::FacebookServiceMultiface::add(*iter); - } - } - virtual ~ThriftHiveMetastoreMultiface() {} - protected: - std::vector > ifaces_; - ThriftHiveMetastoreMultiface() {} - void add(boost::shared_ptr iface) { - facebook::fb303::FacebookServiceMultiface::add(iface); - ifaces_.push_back(iface); - } - public: - void create_database(const Database& database) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->create_database(database); - } - } - - void get_database(Database& _return, const std::string& name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_database(_return, name); - return; - } else { - ifaces_[i]->get_database(_return, name); - } - } - } - - void drop_database(const std::string& name, const bool deleteData) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->drop_database(name, deleteData); - } - } - - void get_databases(std::vector & _return, const std::string& pattern) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_databases(_return, pattern); - return; - } else { - ifaces_[i]->get_databases(_return, pattern); - } - } - } - - void get_all_databases(std::vector & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_databases(_return); - return; - } else { - ifaces_[i]->get_all_databases(_return); - } - } - } - - void get_type(Type& _return, const std::string& name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type(_return, name); - return; - } else { - ifaces_[i]->get_type(_return, name); - } - } - } - - bool create_type(const Type& type) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->create_type(type); - } else { - ifaces_[i]->create_type(type); - } - } - } - - bool drop_type(const std::string& type) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_type(type); - } else { - ifaces_[i]->drop_type(type); - } - } - } - - void get_type_all(std::map & _return, const std::string& name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type_all(_return, name); - return; - } else { - ifaces_[i]->get_type_all(_return, name); - } - } - } - - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_fields(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_fields(_return, db_name, table_name); - } - } - } - - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_schema(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_schema(_return, db_name, table_name); - } - } - } - - void create_table(const Table& tbl) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->create_table(tbl); - } - } - - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->drop_table(dbname, name, deleteData); - } - } - - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_tables(_return, db_name, pattern); - return; - } else { - ifaces_[i]->get_tables(_return, db_name, pattern); - } - } - } - - void get_all_tables(std::vector & _return, const std::string& db_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_tables(_return, db_name); - return; - } else { - ifaces_[i]->get_all_tables(_return, db_name); - } - } - } - - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table(_return, dbname, tbl_name); - return; - } else { - ifaces_[i]->get_table(_return, dbname, tbl_name); - } - } - } - - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); - } - } - - void add_partition(Partition& _return, const Partition& new_part) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_partition(_return, new_part); - return; - } else { - ifaces_[i]->add_partition(_return, new_part); - } - } - } - - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - } - } - } - - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - } - } - } - - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } else { - ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } - } - } - - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } else { - ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } - } - } - - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - } - } - } - - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - } - } - } - - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - } - } - } - - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - } - } - } - - void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - } - } - } - - void 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) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - } - } - } - - void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - return; - } else { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - } - } - } - - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->alter_partition(db_name, tbl_name, new_part); - } - } - - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_config_value(_return, name, defaultValue); - return; - } else { - ifaces_[i]->get_config_value(_return, name, defaultValue); - } - } - } - - void partition_name_to_vals(std::vector & _return, const std::string& part_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_vals(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_vals(_return, part_name); - } - } - } - - void partition_name_to_spec(std::map & _return, const std::string& part_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_spec(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_spec(_return, part_name); - } - } - } - - void add_index(Index& _return, const Index& new_index, const Table& index_table) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_index(_return, new_index, index_table); - return; - } else { - ifaces_[i]->add_index(_return, new_index, index_table); - } - } - } - - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); - } - } - - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } else { - ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } - } - } - - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - return; - } else { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - } - } - } - - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - } - } - } - - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - } - } - } - -}; - -}}} // namespace - -#endif diff --git metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp deleted file mode 100644 index 3ef03b5..0000000 --- metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ /dev/null @@ -1,234 +0,0 @@ -// This autogenerated skeleton file illustrates how to build a server. -// You should copy it to another filename to avoid overwriting it. - -#include "ThriftHiveMetastore.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 ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { - public: - ThriftHiveMetastoreHandler() { - // Your initialization goes here - } - - void create_database(const Database& database) { - // Your implementation goes here - printf("create_database\n"); - } - - void get_database(Database& _return, const std::string& name) { - // Your implementation goes here - printf("get_database\n"); - } - - void drop_database(const std::string& name, const bool deleteData) { - // Your implementation goes here - printf("drop_database\n"); - } - - void get_databases(std::vector & _return, const std::string& pattern) { - // Your implementation goes here - printf("get_databases\n"); - } - - void get_all_databases(std::vector & _return) { - // Your implementation goes here - printf("get_all_databases\n"); - } - - void get_type(Type& _return, const std::string& name) { - // Your implementation goes here - printf("get_type\n"); - } - - bool create_type(const Type& type) { - // Your implementation goes here - printf("create_type\n"); - } - - bool drop_type(const std::string& type) { - // Your implementation goes here - printf("drop_type\n"); - } - - void get_type_all(std::map & _return, const std::string& name) { - // Your implementation goes here - printf("get_type_all\n"); - } - - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - // Your implementation goes here - printf("get_fields\n"); - } - - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - // Your implementation goes here - printf("get_schema\n"); - } - - void create_table(const Table& tbl) { - // Your implementation goes here - printf("create_table\n"); - } - - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - // Your implementation goes here - printf("drop_table\n"); - } - - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - // Your implementation goes here - printf("get_tables\n"); - } - - void get_all_tables(std::vector & _return, const std::string& db_name) { - // Your implementation goes here - printf("get_all_tables\n"); - } - - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - // Your implementation goes here - printf("get_table\n"); - } - - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - // Your implementation goes here - printf("alter_table\n"); - } - - void add_partition(Partition& _return, const Partition& new_part) { - // Your implementation goes here - printf("add_partition\n"); - } - - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - // Your implementation goes here - printf("append_partition\n"); - } - - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - // Your implementation goes here - printf("append_partition_by_name\n"); - } - - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - // Your implementation goes here - printf("drop_partition\n"); - } - - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { - // Your implementation goes here - printf("drop_partition_by_name\n"); - } - - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - // Your implementation goes here - printf("get_partition\n"); - } - - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - // Your implementation goes here - printf("get_partition_by_name\n"); - } - - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - // Your implementation goes here - printf("get_partitions\n"); - } - - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - // Your implementation goes here - printf("get_partition_names\n"); - } - - void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - // Your implementation goes here - printf("get_partitions_ps\n"); - } - - void 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) { - // Your implementation goes here - printf("get_partition_names_ps\n"); - } - - void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { - // Your implementation goes here - printf("get_partitions_by_filter\n"); - } - - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - // Your implementation goes here - printf("alter_partition\n"); - } - - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - // Your implementation goes here - printf("get_config_value\n"); - } - - void partition_name_to_vals(std::vector & _return, const std::string& part_name) { - // Your implementation goes here - printf("partition_name_to_vals\n"); - } - - void partition_name_to_spec(std::map & _return, const std::string& part_name) { - // Your implementation goes here - printf("partition_name_to_spec\n"); - } - - void add_index(Index& _return, const Index& new_index, const Table& index_table) { - // Your implementation goes here - printf("add_index\n"); - } - - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - // Your implementation goes here - printf("alter_index\n"); - } - - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - // Your implementation goes here - printf("drop_index_by_name\n"); - } - - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - // Your implementation goes here - printf("get_index_by_name\n"); - } - - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - // Your implementation goes here - printf("get_indexes\n"); - } - - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - // Your implementation goes here - printf("get_index_names\n"); - } - -}; - -int main(int argc, char **argv) { - int port = 9090; - shared_ptr handler(new ThriftHiveMetastoreHandler()); - shared_ptr processor(new ThriftHiveMetastoreProcessor(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 metastore/src/gen-cpp/hive_metastore_constants.cpp metastore/src/gen-cpp/hive_metastore_constants.cpp deleted file mode 100644 index 7782be0..0000000 --- metastore/src/gen-cpp/hive_metastore_constants.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "hive_metastore_constants.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -const hive_metastoreConstants g_hive_metastore_constants; - -hive_metastoreConstants::hive_metastoreConstants() { - DDL_TIME = "transient_lastDdlTime"; - - IS_ARCHIVED = "is_archived"; - - ORIGINAL_LOCATION = "original_location"; - - META_TABLE_COLUMNS = "columns"; - - META_TABLE_COLUMN_TYPES = "columns.types"; - - BUCKET_FIELD_NAME = "bucket_field_name"; - - BUCKET_COUNT = "bucket_count"; - - FIELD_TO_DIMENSION = "field_to_dimension"; - - META_TABLE_NAME = "name"; - - META_TABLE_DB = "db"; - - META_TABLE_LOCATION = "location"; - - META_TABLE_SERDE = "serde"; - - META_TABLE_PARTITION_COLUMNS = "partition_columns"; - - FILE_INPUT_FORMAT = "file.inputformat"; - - FILE_OUTPUT_FORMAT = "file.outputformat"; - - META_TABLE_STORAGE = "storage_handler"; - -} - -}}} // namespace - diff --git metastore/src/gen-cpp/hive_metastore_constants.h metastore/src/gen-cpp/hive_metastore_constants.h deleted file mode 100644 index 5758b90..0000000 --- metastore/src/gen-cpp/hive_metastore_constants.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef hive_metastore_CONSTANTS_H -#define hive_metastore_CONSTANTS_H - -#include "hive_metastore_types.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -class hive_metastoreConstants { - public: - hive_metastoreConstants(); - - std::string DDL_TIME; - std::string IS_ARCHIVED; - std::string ORIGINAL_LOCATION; - std::string META_TABLE_COLUMNS; - std::string META_TABLE_COLUMN_TYPES; - std::string BUCKET_FIELD_NAME; - std::string BUCKET_COUNT; - std::string FIELD_TO_DIMENSION; - std::string META_TABLE_NAME; - std::string META_TABLE_DB; - std::string META_TABLE_LOCATION; - std::string META_TABLE_SERDE; - std::string META_TABLE_PARTITION_COLUMNS; - std::string FILE_INPUT_FORMAT; - std::string FILE_OUTPUT_FORMAT; - std::string META_TABLE_STORAGE; -}; - -extern const hive_metastoreConstants g_hive_metastore_constants; - -}}} // namespace - -#endif diff --git metastore/src/gen-cpp/hive_metastore_types.cpp metastore/src/gen-cpp/hive_metastore_types.cpp deleted file mode 100644 index c000db9..0000000 --- metastore/src/gen-cpp/hive_metastore_types.cpp +++ /dev/null @@ -1,1897 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "hive_metastore_types.h" - -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 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->version); - this->__isset.version = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comments); - this->__isset.comments = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->version); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("comments", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->comments); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comment); - this->__isset.comment = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - 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->writeString(this->comment); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type1); - this->__isset.type1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type2); - this->__isset.type2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->fields.clear(); - uint32_t _size0; - apache::thrift::protocol::TType _etype3; - iprot->readListBegin(_etype3, _size0); - this->fields.resize(_size0); - uint32_t _i4; - for (_i4 = 0; _i4 < _size0; ++_i4) - { - xfer += this->fields[_i4].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.fields = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - if (this->__isset.type1) { - 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->writeString(this->type2); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fields) { - xfer += oprot->writeFieldBegin("fields", apache::thrift::protocol::T_LIST, 4); - { - 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) - { - xfer += (*_iter5).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->description); - this->__isset.description = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->locationUri); - this->__isset.locationUri = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - 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->writeString(this->locationUri); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->serializationLib); - this->__isset.serializationLib = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size6; - apache::thrift::protocol::TType _ktype7; - apache::thrift::protocol::TType _vtype8; - iprot->readMapBegin(_ktype7, _vtype8, _size6); - uint32_t _i10; - for (_i10 = 0; _i10 < _size6; ++_i10) - { - std::string _key11; - xfer += iprot->readString(_key11); - std::string& _val12 = this->parameters[_key11]; - xfer += iprot->readString(_val12); - } - iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->name); - xfer += oprot->writeFieldEnd(); - 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->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) - { - xfer += oprot->writeString(_iter13->first); - xfer += oprot->writeString(_iter13->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->col); - this->__isset.col = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->order); - this->__isset.order = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->col); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("order", apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->order); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->cols.clear(); - uint32_t _size14; - apache::thrift::protocol::TType _etype17; - iprot->readListBegin(_etype17, _size14); - this->cols.resize(_size14); - uint32_t _i18; - for (_i18 = 0; _i18 < _size14; ++_i18) - { - xfer += this->cols[_i18].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.cols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->location); - this->__isset.location = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->inputFormat); - this->__isset.inputFormat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->outputFormat); - this->__isset.outputFormat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->compressed); - this->__isset.compressed = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->numBuckets); - this->__isset.numBuckets = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->serdeInfo.read(iprot); - this->__isset.serdeInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->bucketCols.clear(); - uint32_t _size19; - apache::thrift::protocol::TType _etype22; - iprot->readListBegin(_etype22, _size19); - this->bucketCols.resize(_size19); - uint32_t _i23; - for (_i23 = 0; _i23 < _size19; ++_i23) - { - xfer += iprot->readString(this->bucketCols[_i23]); - } - iprot->readListEnd(); - } - this->__isset.bucketCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->sortCols.clear(); - uint32_t _size24; - apache::thrift::protocol::TType _etype27; - iprot->readListBegin(_etype27, _size24); - this->sortCols.resize(_size24); - uint32_t _i28; - for (_i28 = 0; _i28 < _size24; ++_i28) - { - xfer += this->sortCols[_i28].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.sortCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size29; - apache::thrift::protocol::TType _ktype30; - apache::thrift::protocol::TType _vtype31; - iprot->readMapBegin(_ktype30, _vtype31, _size29); - uint32_t _i33; - for (_i33 = 0; _i33 < _size29; ++_i33) - { - std::string _key34; - xfer += iprot->readString(_key34); - std::string& _val35 = this->parameters[_key34]; - xfer += iprot->readString(_val35); - } - iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->cols.size()); - std::vector ::const_iterator _iter36; - for (_iter36 = this->cols.begin(); _iter36 != this->cols.end(); ++_iter36) - { - xfer += (*_iter36).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - 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->writeString(this->inputFormat); - xfer += oprot->writeFieldEnd(); - 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->writeBool(this->compressed); - xfer += oprot->writeFieldEnd(); - 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 += this->serdeInfo.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("bucketCols", apache::thrift::protocol::T_LIST, 8); - { - 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) - { - xfer += oprot->writeString((*_iter37)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("sortCols", apache::thrift::protocol::T_LIST, 9); - { - 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) - { - xfer += (*_iter38).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - 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()); - std::map ::const_iterator _iter39; - for (_iter39 = this->parameters.begin(); _iter39 != this->parameters.end(); ++_iter39) - { - xfer += oprot->writeString(_iter39->first); - xfer += oprot->writeString(_iter39->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->owner); - this->__isset.owner = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->retention); - this->__isset.retention = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->partitionKeys.clear(); - uint32_t _size40; - apache::thrift::protocol::TType _etype43; - iprot->readListBegin(_etype43, _size40); - this->partitionKeys.resize(_size40); - uint32_t _i44; - for (_i44 = 0; _i44 < _size40; ++_i44) - { - xfer += this->partitionKeys[_i44].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.partitionKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size45; - apache::thrift::protocol::TType _ktype46; - apache::thrift::protocol::TType _vtype47; - iprot->readMapBegin(_ktype46, _vtype47, _size45); - uint32_t _i49; - for (_i49 = 0; _i49 < _size45; ++_i49) - { - std::string _key50; - xfer += iprot->readString(_key50); - std::string& _val51 = this->parameters[_key50]; - xfer += iprot->readString(_val51); - } - iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->viewOriginalText); - this->__isset.viewOriginalText = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->viewExpandedText); - this->__isset.viewExpandedText = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableType); - this->__isset.tableType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - 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->writeString(this->owner); - xfer += oprot->writeFieldEnd(); - 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->writeI32(this->lastAccessTime); - xfer += oprot->writeFieldEnd(); - 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 += this->sd.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitionKeys", apache::thrift::protocol::T_LIST, 8); - { - 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) - { - xfer += (*_iter52).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - 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()); - std::map ::const_iterator _iter53; - for (_iter53 = this->parameters.begin(); _iter53 != this->parameters.end(); ++_iter53) - { - xfer += oprot->writeString(_iter53->first); - xfer += oprot->writeString(_iter53->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - 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->writeString(this->viewExpandedText); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tableType", apache::thrift::protocol::T_STRING, 12); - xfer += oprot->writeString(this->tableType); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size54; - apache::thrift::protocol::TType _etype57; - iprot->readListBegin(_etype57, _size54); - this->values.resize(_size54); - uint32_t _i58; - for (_i58 = 0; _i58 < _size54; ++_i58) - { - xfer += iprot->readString(this->values[_i58]); - } - iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size59; - apache::thrift::protocol::TType _ktype60; - apache::thrift::protocol::TType _vtype61; - iprot->readMapBegin(_ktype60, _vtype61, _size59); - uint32_t _i63; - for (_i63 = 0; _i63 < _size59; ++_i63) - { - std::string _key64; - xfer += iprot->readString(_key64); - std::string& _val65 = this->parameters[_key64]; - xfer += iprot->readString(_val65); - } - iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRING, this->values.size()); - std::vector ::const_iterator _iter66; - for (_iter66 = this->values.begin(); _iter66 != this->values.end(); ++_iter66) - { - xfer += oprot->writeString((*_iter66)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dbName", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tableName", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - 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->writeI32(this->lastAccessTime); - xfer += oprot->writeFieldEnd(); - 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->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) - { - xfer += oprot->writeString(_iter67->first); - xfer += oprot->writeString(_iter67->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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->indexName); - this->__isset.indexName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->indexHandlerClass); - this->__isset.indexHandlerClass = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->origTableName); - this->__isset.origTableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->indexTableName); - this->__isset.indexTableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size68; - apache::thrift::protocol::TType _ktype69; - apache::thrift::protocol::TType _vtype70; - iprot->readMapBegin(_ktype69, _vtype70, _size68); - uint32_t _i72; - for (_i72 = 0; _i72 < _size68; ++_i72) - { - std::string _key73; - xfer += iprot->readString(_key73); - std::string& _val74 = this->parameters[_key73]; - xfer += iprot->readString(_val74); - } - iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deferredRebuild); - this->__isset.deferredRebuild = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->indexName); - xfer += oprot->writeFieldEnd(); - 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->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - 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->writeI32(this->createTime); - xfer += oprot->writeFieldEnd(); - 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->writeString(this->indexTableName); - xfer += oprot->writeFieldEnd(); - 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->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) - { - xfer += oprot->writeString(_iter75->first); - xfer += oprot->writeString(_iter75->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deferredRebuild", apache::thrift::protocol::T_BOOL, 10); - xfer += oprot->writeBool(this->deferredRebuild); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; -const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; - -uint32_t Schema::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->fieldSchemas.clear(); - uint32_t _size76; - apache::thrift::protocol::TType _etype79; - iprot->readListBegin(_etype79, _size76); - this->fieldSchemas.resize(_size76); - uint32_t _i80; - for (_i80 = 0; _i80 < _size76; ++_i80) - { - xfer += this->fieldSchemas[_i80].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.fieldSchemas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->properties.clear(); - uint32_t _size81; - apache::thrift::protocol::TType _ktype82; - apache::thrift::protocol::TType _vtype83; - iprot->readMapBegin(_ktype82, _vtype83, _size81); - uint32_t _i85; - for (_i85 = 0; _i85 < _size81; ++_i85) - { - std::string _key86; - xfer += iprot->readString(_key86); - std::string& _val87 = this->properties[_key86]; - xfer += iprot->readString(_val87); - } - iprot->readMapEnd(); - } - this->__isset.properties = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeListBegin(apache::thrift::protocol::T_STRUCT, this->fieldSchemas.size()); - std::vector ::const_iterator _iter88; - for (_iter88 = this->fieldSchemas.begin(); _iter88 != this->fieldSchemas.end(); ++_iter88) - { - xfer += (*_iter88).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - 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()); - std::map ::const_iterator _iter89; - for (_iter89 = this->properties.begin(); _iter89 != this->properties.end(); ++_iter89) - { - xfer += oprot->writeString(_iter89->first); - xfer += oprot->writeString(_iter89->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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 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 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -}}} // namespace diff --git metastore/src/gen-cpp/hive_metastore_types.h metastore/src/gen-cpp/hive_metastore_types.h deleted file mode 100644 index f6cd7e5..0000000 --- metastore/src/gen-cpp/hive_metastore_types.h +++ /dev/null @@ -1,914 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef hive_metastore_TYPES_H -#define hive_metastore_TYPES_H - -#include -#include -#include - -#include "fb303_types.h" - - -namespace Apache { namespace Hadoop { namespace Hive { - -class Version { - public: - - static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972"; - static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72}; - - Version() : version(""), comments("") { - } - - virtual ~Version() throw() {} - - std::string version; - std::string comments; - - struct __isset { - __isset() : version(false), comments(false) {} - bool version; - bool comments; - } __isset; - - bool operator == (const Version & rhs) const - { - if (!(version == rhs.version)) - return false; - if (!(comments == rhs.comments)) - return false; - return true; - } - bool operator != (const Version &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Version & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FieldSchema { - public: - - static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; - static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; - - FieldSchema() : name(""), type(""), comment("") { - } - - virtual ~FieldSchema() throw() {} - - std::string name; - std::string type; - std::string comment; - - struct __isset { - __isset() : name(false), type(false), comment(false) {} - bool name; - bool type; - bool comment; - } __isset; - - bool operator == (const FieldSchema & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(type == rhs.type)) - return false; - if (!(comment == rhs.comment)) - return false; - return true; - } - bool operator != (const FieldSchema &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FieldSchema & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Type { - public: - - static const char* ascii_fingerprint; // = "20DF02DE523C27F7066C7BD4D9120842"; - static const uint8_t binary_fingerprint[16]; // = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; - - Type() : name(""), type1(""), type2("") { - } - - virtual ~Type() throw() {} - - std::string name; - std::string type1; - 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; - - bool operator == (const Type & rhs) const - { - if (!(name == rhs.name)) - return false; - if (__isset.type1 != rhs.__isset.type1) - return false; - else if (__isset.type1 && !(type1 == rhs.type1)) - return false; - if (__isset.type2 != rhs.__isset.type2) - return false; - else if (__isset.type2 && !(type2 == rhs.type2)) - return false; - if (__isset.fields != rhs.__isset.fields) - return false; - else if (__isset.fields && !(fields == rhs.fields)) - return false; - return true; - } - bool operator != (const Type &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Type & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Database { - public: - - static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; - static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; - - Database() : name(""), description(""), locationUri("") { - } - - virtual ~Database() throw() {} - - std::string name; - std::string description; - std::string locationUri; - - struct __isset { - __isset() : name(false), description(false), locationUri(false) {} - bool name; - bool description; - bool locationUri; - } __isset; - - bool operator == (const Database & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(description == rhs.description)) - return false; - if (!(locationUri == rhs.locationUri)) - return false; - return true; - } - bool operator != (const Database &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Database & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class SerDeInfo { - public: - - static const char* ascii_fingerprint; // = "B1021C32A35A2AEFCD2F57A5424159A7"; - static const uint8_t binary_fingerprint[16]; // = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; - - SerDeInfo() : name(""), serializationLib("") { - } - - virtual ~SerDeInfo() throw() {} - - std::string name; - std::string serializationLib; - std::map parameters; - - struct __isset { - __isset() : name(false), serializationLib(false), parameters(false) {} - bool name; - bool serializationLib; - bool parameters; - } __isset; - - bool operator == (const SerDeInfo & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(serializationLib == rhs.serializationLib)) - return false; - if (!(parameters == rhs.parameters)) - return false; - return true; - } - bool operator != (const SerDeInfo &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SerDeInfo & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Order { - public: - - static const char* ascii_fingerprint; // = "EEBC915CE44901401D881E6091423036"; - static const uint8_t binary_fingerprint[16]; // = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; - - Order() : col(""), order(0) { - } - - virtual ~Order() throw() {} - - std::string col; - int32_t order; - - struct __isset { - __isset() : col(false), order(false) {} - bool col; - bool order; - } __isset; - - bool operator == (const Order & rhs) const - { - if (!(col == rhs.col)) - return false; - if (!(order == rhs.order)) - return false; - return true; - } - bool operator != (const Order &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Order & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class StorageDescriptor { - public: - - static const char* ascii_fingerprint; // = "11E4CE18F895C13812C853DFDCD1293F"; - static const uint8_t binary_fingerprint[16]; // = {0x11,0xE4,0xCE,0x18,0xF8,0x95,0xC1,0x38,0x12,0xC8,0x53,0xDF,0xDC,0xD1,0x29,0x3F}; - - StorageDescriptor() : location(""), inputFormat(""), outputFormat(""), compressed(0), numBuckets(0) { - } - - virtual ~StorageDescriptor() throw() {} - - std::vector cols; - std::string location; - std::string inputFormat; - std::string outputFormat; - bool compressed; - int32_t numBuckets; - SerDeInfo serdeInfo; - std::vector bucketCols; - 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; - - bool operator == (const StorageDescriptor & rhs) const - { - if (!(cols == rhs.cols)) - return false; - if (!(location == rhs.location)) - return false; - if (!(inputFormat == rhs.inputFormat)) - return false; - if (!(outputFormat == rhs.outputFormat)) - return false; - if (!(compressed == rhs.compressed)) - return false; - if (!(numBuckets == rhs.numBuckets)) - return false; - if (!(serdeInfo == rhs.serdeInfo)) - return false; - if (!(bucketCols == rhs.bucketCols)) - return false; - if (!(sortCols == rhs.sortCols)) - return false; - if (!(parameters == rhs.parameters)) - return false; - return true; - } - bool operator != (const StorageDescriptor &rhs) const { - return !(*this == rhs); - } - - bool operator < (const StorageDescriptor & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Table { - public: - - static const char* ascii_fingerprint; // = "F709D087CEEE7C49380296E3B423FF76"; - static const uint8_t binary_fingerprint[16]; // = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; - - Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { - } - - virtual ~Table() throw() {} - - std::string tableName; - std::string dbName; - std::string owner; - int32_t createTime; - int32_t lastAccessTime; - int32_t retention; - StorageDescriptor sd; - std::vector partitionKeys; - std::map parameters; - std::string viewOriginalText; - 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; - - bool operator == (const Table & rhs) const - { - if (!(tableName == rhs.tableName)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(owner == rhs.owner)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(retention == rhs.retention)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(partitionKeys == rhs.partitionKeys)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (!(viewOriginalText == rhs.viewOriginalText)) - return false; - if (!(viewExpandedText == rhs.viewExpandedText)) - return false; - if (!(tableType == rhs.tableType)) - return false; - return true; - } - bool operator != (const Table &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Table & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Partition { - public: - - static const char* ascii_fingerprint; // = "E5EDC507CBBC5F6F81AAC4845B38F51B"; - static const uint8_t binary_fingerprint[16]; // = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; - - Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { - } - - virtual ~Partition() throw() {} - - std::vector values; - std::string dbName; - std::string tableName; - int32_t createTime; - int32_t lastAccessTime; - 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; - - bool operator == (const Partition & rhs) const - { - if (!(values == rhs.values)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(parameters == rhs.parameters)) - return false; - return true; - } - bool operator != (const Partition &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Partition & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Index { - public: - - static const char* ascii_fingerprint; // = "5FEE4F7E28935B644F207D74459F6A29"; - static const uint8_t binary_fingerprint[16]; // = {0x5F,0xEE,0x4F,0x7E,0x28,0x93,0x5B,0x64,0x4F,0x20,0x7D,0x74,0x45,0x9F,0x6A,0x29}; - - Index() : indexName(""), indexHandlerClass(""), dbName(""), origTableName(""), createTime(0), lastAccessTime(0), indexTableName(""), deferredRebuild(0) { - } - - virtual ~Index() throw() {} - - std::string indexName; - std::string indexHandlerClass; - std::string dbName; - std::string origTableName; - int32_t createTime; - int32_t lastAccessTime; - std::string indexTableName; - StorageDescriptor sd; - 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; - - bool operator == (const Index & rhs) const - { - if (!(indexName == rhs.indexName)) - return false; - if (!(indexHandlerClass == rhs.indexHandlerClass)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(origTableName == rhs.origTableName)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(indexTableName == rhs.indexTableName)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (!(deferredRebuild == rhs.deferredRebuild)) - return false; - return true; - } - bool operator != (const Index &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Index & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class Schema { - public: - - static const char* ascii_fingerprint; // = "5CFEE46C975F4E2368D905109B8E3B5B"; - static const uint8_t binary_fingerprint[16]; // = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; - - Schema() { - } - - virtual ~Schema() throw() {} - - std::vector fieldSchemas; - std::map properties; - - struct __isset { - __isset() : fieldSchemas(false), properties(false) {} - bool fieldSchemas; - bool properties; - } __isset; - - bool operator == (const Schema & rhs) const - { - if (!(fieldSchemas == rhs.fieldSchemas)) - return false; - if (!(properties == rhs.properties)) - return false; - return true; - } - bool operator != (const Schema &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Schema & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class MetaException : 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}; - - MetaException() : message("") { - } - - virtual ~MetaException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const MetaException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const MetaException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const MetaException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class UnknownTableException : 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}; - - UnknownTableException() : message("") { - } - - virtual ~UnknownTableException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const UnknownTableException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const UnknownTableException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnknownTableException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class UnknownDBException : 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}; - - UnknownDBException() : message("") { - } - - virtual ~UnknownDBException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const UnknownDBException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const UnknownDBException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnknownDBException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class AlreadyExistsException : 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}; - - AlreadyExistsException() : message("") { - } - - virtual ~AlreadyExistsException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const AlreadyExistsException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const AlreadyExistsException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AlreadyExistsException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class InvalidObjectException : 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}; - - InvalidObjectException() : message("") { - } - - virtual ~InvalidObjectException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const InvalidObjectException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidObjectException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidObjectException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class NoSuchObjectException : 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}; - - NoSuchObjectException() : message("") { - } - - virtual ~NoSuchObjectException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const NoSuchObjectException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const NoSuchObjectException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NoSuchObjectException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class IndexAlreadyExistsException : 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}; - - IndexAlreadyExistsException() : message("") { - } - - virtual ~IndexAlreadyExistsException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const IndexAlreadyExistsException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const IndexAlreadyExistsException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const IndexAlreadyExistsException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class InvalidOperationException : 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}; - - InvalidOperationException() : message("") { - } - - virtual ~InvalidOperationException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const InvalidOperationException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidOperationException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidOperationException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ConfigValSecurityException : 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}; - - ConfigValSecurityException() : message("") { - } - - virtual ~ConfigValSecurityException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const ConfigValSecurityException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const ConfigValSecurityException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ConfigValSecurityException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -}}} // namespace - -#endif diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java deleted file mode 100644 index da48608..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(AlreadyExistsException.class, metaDataMap); - } - - public AlreadyExistsException() { - } - - public AlreadyExistsException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public AlreadyExistsException(AlreadyExistsException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public AlreadyExistsException clone() { - return new AlreadyExistsException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AlreadyExistsException) - return this.equals((AlreadyExistsException)that); - return false; - } - - public boolean equals(AlreadyExistsException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("AlreadyExistsException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 7245722..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(ConfigValSecurityException.class, metaDataMap); - } - - public ConfigValSecurityException() { - } - - public ConfigValSecurityException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public ConfigValSecurityException(ConfigValSecurityException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public ConfigValSecurityException clone() { - return new ConfigValSecurityException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ConfigValSecurityException) - return this.equals((ConfigValSecurityException)that); - return false; - } - - public boolean equals(ConfigValSecurityException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ConfigValSecurityException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index de0dfbb..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -public class Constants { - - public static final String DDL_TIME = "transient_lastDdlTime"; - - public static final String IS_ARCHIVED = "is_archived"; - - public static final String ORIGINAL_LOCATION = "original_location"; - - public static final String META_TABLE_COLUMNS = "columns"; - - public static final String META_TABLE_COLUMN_TYPES = "columns.types"; - - public static final String BUCKET_FIELD_NAME = "bucket_field_name"; - - public static final String BUCKET_COUNT = "bucket_count"; - - public static final String FIELD_TO_DIMENSION = "field_to_dimension"; - - public static final String META_TABLE_NAME = "name"; - - public static final String META_TABLE_DB = "db"; - - public static final String META_TABLE_LOCATION = "location"; - - public static final String META_TABLE_SERDE = "serde"; - - public static final String META_TABLE_PARTITION_COLUMNS = "partition_columns"; - - public static final String FILE_INPUT_FORMAT = "file.inputformat"; - - public static final String FILE_OUTPUT_FORMAT = "file.outputformat"; - - public static final String META_TABLE_STORAGE = "storage_handler"; - -} 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 deleted file mode 100644 index e916cb8..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(LOCATIONURI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); - } - - public Database() { - } - - public Database( - String name, - String description, - String locationUri) - { - this(); - this.name = name; - this.description = description; - this.locationUri = locationUri; - } - - /** - * Performs a deep copy on other. - */ - public Database(Database other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetDescription()) { - this.description = other.description; - } - if (other.isSetLocationUri()) { - this.locationUri = other.locationUri; - } - } - - @Override - public Database clone() { - return new Database(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - public void unsetDescription() { - this.description = null; - } - - // Returns true if field description is set (has been asigned a value) and false otherwise - public boolean isSetDescription() { - return this.description != null; - } - - public String getLocationUri() { - return this.locationUri; - } - - public void setLocationUri(String locationUri) { - this.locationUri = locationUri; - } - - public void unsetLocationUri() { - this.locationUri = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DESCRIPTION: - if (value == null) { - unsetDescription(); - } else { - setDescription((String)value); - } - break; - - case LOCATIONURI: - if (value == null) { - unsetLocationUri(); - } else { - setLocationUri((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case DESCRIPTION: - return getDescription(); - - case LOCATIONURI: - return getLocationUri(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case DESCRIPTION: - return isSetDescription(); - case LOCATIONURI: - return isSetLocationUri(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Database) - return this.equals((Database)that); - return false; - } - - public boolean equals(Database that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_description = true && this.isSetDescription(); - boolean that_present_description = true && that.isSetDescription(); - if (this_present_description || that_present_description) { - if (!(this_present_description && that_present_description)) - return false; - if (!this.description.equals(that.description)) - return false; - } - - boolean this_present_locationUri = true && this.isSetLocationUri(); - boolean that_present_locationUri = true && that.isSetLocationUri(); - if (this_present_locationUri || that_present_locationUri) { - if (!(this_present_locationUri && that_present_locationUri)) - return false; - if (!this.locationUri.equals(that.locationUri)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DESCRIPTION: - if (field.type == TType.STRING) { - this.description = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LOCATIONURI: - if (field.type == TType.STRING) { - this.locationUri = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.description != null) { - oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); - oprot.writeString(this.description); - oprot.writeFieldEnd(); - } - if (this.locationUri != null) { - oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); - oprot.writeString(this.locationUri); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Database("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("description:"); - if (this.description == null) { - sb.append("null"); - } else { - sb.append(this.description); - } - first = false; - if (!first) sb.append(", "); - sb.append("locationUri:"); - if (this.locationUri == null) { - sb.append("null"); - } else { - sb.append(this.locationUri); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java deleted file mode 100644 index 065f371..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); - } - - public FieldSchema() { - } - - public FieldSchema( - String name, - String type, - String comment) - { - this(); - this.name = name; - this.type = type; - this.comment = comment; - } - - /** - * Performs a deep copy on other. - */ - public FieldSchema(FieldSchema other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetComment()) { - this.comment = other.comment; - } - } - - @Override - public FieldSchema clone() { - return new FieldSchema(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - // Returns true if field type is set (has been asigned a value) and false otherwise - public boolean isSetType() { - return this.type != null; - } - - public String getComment() { - return this.comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public void unsetComment() { - this.comment = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((String)value); - } - break; - - case COMMENT: - if (value == null) { - unsetComment(); - } else { - setComment((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case TYPE: - return getType(); - - case COMMENT: - return getComment(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case TYPE: - return isSetType(); - case COMMENT: - return isSetComment(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof FieldSchema) - return this.equals((FieldSchema)that); - return false; - } - - public boolean equals(FieldSchema that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_comment = true && this.isSetComment(); - boolean that_present_comment = true && that.isSetComment(); - if (this_present_comment || that_present_comment) { - if (!(this_present_comment && that_present_comment)) - return false; - if (!this.comment.equals(that.comment)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TYPE: - if (field.type == TType.STRING) { - this.type = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COMMENT: - if (field.type == TType.STRING) { - this.comment = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - if (this.comment != null) { - oprot.writeFieldBegin(COMMENT_FIELD_DESC); - oprot.writeString(this.comment); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("FieldSchema("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("comment:"); - if (this.comment == null) { - sb.append("null"); - } else { - sb.append(this.comment); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java deleted file mode 100644 index 12a3dd2..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java +++ /dev/null @@ -1,868 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField ORIG_TABLE_NAME_FIELD_DESC = new TField("origTableName", TType.STRING, (short)4); - private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); - private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)6); - private static final TField INDEX_TABLE_NAME_FIELD_DESC = new TField("indexTableName", TType.STRING, (short)7); - private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)8); - private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)9); - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(INDEXNAME, new FieldMetaData("indexName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INDEXHANDLERCLASS, new FieldMetaData("indexHandlerClass", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(ORIGTABLENAME, new FieldMetaData("origTableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(INDEXTABLENAME, new FieldMetaData("indexTableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(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, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap); - } - - public Index() { - } - - public Index( - String indexName, - String indexHandlerClass, - String dbName, - String origTableName, - int createTime, - int lastAccessTime, - String indexTableName, - StorageDescriptor sd, - Map parameters, - boolean deferredRebuild) - { - this(); - this.indexName = indexName; - this.indexHandlerClass = indexHandlerClass; - this.dbName = dbName; - this.origTableName = origTableName; - this.createTime = createTime; - this.__isset.createTime = true; - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - this.indexTableName = indexTableName; - this.sd = sd; - this.parameters = parameters; - this.deferredRebuild = deferredRebuild; - this.__isset.deferredRebuild = true; - } - - /** - * Performs a deep copy on other. - */ - public Index(Index other) { - if (other.isSetIndexName()) { - this.indexName = other.indexName; - } - if (other.isSetIndexHandlerClass()) { - this.indexHandlerClass = other.indexHandlerClass; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - 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; - } - if (other.isSetSd()) { - this.sd = new StorageDescriptor(other.sd); - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(); - for (Map.Entry other_element : other.parameters.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__parameters_copy_key = other_element_key; - - String __this__parameters_copy_value = other_element_value; - - __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); - } - this.parameters = __this__parameters; - } - __isset.deferredRebuild = other.__isset.deferredRebuild; - this.deferredRebuild = other.deferredRebuild; - } - - @Override - public Index clone() { - return new Index(this); - } - - public String getIndexName() { - return this.indexName; - } - - public void setIndexName(String indexName) { - this.indexName = indexName; - } - - public void unsetIndexName() { - this.indexName = null; - } - - // Returns true if field indexName is set (has been asigned a value) and false otherwise - public boolean isSetIndexName() { - return this.indexName != null; - } - - public String getIndexHandlerClass() { - return this.indexHandlerClass; - } - - public void setIndexHandlerClass(String indexHandlerClass) { - this.indexHandlerClass = indexHandlerClass; - } - - public void unsetIndexHandlerClass() { - this.indexHandlerClass = null; - } - - // Returns true if field indexHandlerClass is set (has been asigned a value) and false otherwise - public boolean isSetIndexHandlerClass() { - return this.indexHandlerClass != null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - // Returns true if field dbName is set (has been asigned a value) and false otherwise - public boolean isSetDbName() { - return this.dbName != null; - } - - public String getOrigTableName() { - return this.origTableName; - } - - public void setOrigTableName(String origTableName) { - this.origTableName = origTableName; - } - - public void unsetOrigTableName() { - this.origTableName = null; - } - - // Returns true if field origTableName is set (has been asigned a value) and false otherwise - public boolean isSetOrigTableName() { - return this.origTableName != null; - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - this.__isset.createTime = true; - } - - public void unsetCreateTime() { - this.__isset.createTime = false; - } - - // Returns true if field createTime is set (has been asigned a value) and false otherwise - public boolean isSetCreateTime() { - return this.__isset.createTime; - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - } - - public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; - } - - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise - public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; - } - - public String getIndexTableName() { - return this.indexTableName; - } - - public void setIndexTableName(String indexTableName) { - this.indexTableName = indexTableName; - } - - public void unsetIndexTableName() { - this.indexTableName = null; - } - - // Returns true if field indexTableName is set (has been asigned a value) and false otherwise - public boolean isSetIndexTableName() { - return this.indexTableName != null; - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - // Returns true if field sd is set (has been asigned a value) and false otherwise - public boolean isSetSd() { - return this.sd != null; - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - // Returns true if field parameters is set (has been asigned a value) and false otherwise - public boolean isSetParameters() { - return this.parameters != null; - } - - public boolean isDeferredRebuild() { - return this.deferredRebuild; - } - - public void setDeferredRebuild(boolean deferredRebuild) { - this.deferredRebuild = deferredRebuild; - this.__isset.deferredRebuild = true; - } - - public void unsetDeferredRebuild() { - this.__isset.deferredRebuild = false; - } - - // Returns true if field deferredRebuild is set (has been asigned a value) and false otherwise - public boolean isSetDeferredRebuild() { - return this.__isset.deferredRebuild; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case INDEXNAME: - if (value == null) { - unsetIndexName(); - } else { - setIndexName((String)value); - } - break; - - case INDEXHANDLERCLASS: - if (value == null) { - unsetIndexHandlerClass(); - } else { - setIndexHandlerClass((String)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case ORIGTABLENAME: - if (value == null) { - unsetOrigTableName(); - } else { - setOrigTableName((String)value); - } - break; - - case CREATETIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LASTACCESSTIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case INDEXTABLENAME: - if (value == null) { - unsetIndexTableName(); - } else { - setIndexTableName((String)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case DEFERREDREBUILD: - if (value == null) { - unsetDeferredRebuild(); - } else { - setDeferredRebuild((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case INDEXNAME: - return getIndexName(); - - case INDEXHANDLERCLASS: - return getIndexHandlerClass(); - - case DBNAME: - return getDbName(); - - case ORIGTABLENAME: - return getOrigTableName(); - - case CREATETIME: - return new Integer(getCreateTime()); - - case LASTACCESSTIME: - return new Integer(getLastAccessTime()); - - case INDEXTABLENAME: - return getIndexTableName(); - - case SD: - return getSd(); - - case PARAMETERS: - return getParameters(); - - case DEFERREDREBUILD: - return new Boolean(isDeferredRebuild()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case INDEXNAME: - return isSetIndexName(); - case INDEXHANDLERCLASS: - return isSetIndexHandlerClass(); - case DBNAME: - return isSetDbName(); - case ORIGTABLENAME: - return isSetOrigTableName(); - case CREATETIME: - return isSetCreateTime(); - case LASTACCESSTIME: - return isSetLastAccessTime(); - case INDEXTABLENAME: - return isSetIndexTableName(); - case SD: - return isSetSd(); - case PARAMETERS: - return isSetParameters(); - case DEFERREDREBUILD: - return isSetDeferredRebuild(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Index) - return this.equals((Index)that); - return false; - } - - public boolean equals(Index that) { - if (that == null) - return false; - - boolean this_present_indexName = true && this.isSetIndexName(); - boolean that_present_indexName = true && that.isSetIndexName(); - if (this_present_indexName || that_present_indexName) { - if (!(this_present_indexName && that_present_indexName)) - return false; - if (!this.indexName.equals(that.indexName)) - return false; - } - - boolean this_present_indexHandlerClass = true && this.isSetIndexHandlerClass(); - boolean that_present_indexHandlerClass = true && that.isSetIndexHandlerClass(); - if (this_present_indexHandlerClass || that_present_indexHandlerClass) { - if (!(this_present_indexHandlerClass && that_present_indexHandlerClass)) - return false; - if (!this.indexHandlerClass.equals(that.indexHandlerClass)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_origTableName = true && this.isSetOrigTableName(); - boolean that_present_origTableName = true && that.isSetOrigTableName(); - if (this_present_origTableName || that_present_origTableName) { - if (!(this_present_origTableName && that_present_origTableName)) - return false; - if (!this.origTableName.equals(that.origTableName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_indexTableName = true && this.isSetIndexTableName(); - boolean that_present_indexTableName = true && that.isSetIndexTableName(); - if (this_present_indexTableName || that_present_indexTableName) { - if (!(this_present_indexTableName && that_present_indexTableName)) - return false; - if (!this.indexTableName.equals(that.indexTableName)) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_deferredRebuild = true; - boolean that_present_deferredRebuild = true; - if (this_present_deferredRebuild || that_present_deferredRebuild) { - if (!(this_present_deferredRebuild && that_present_deferredRebuild)) - return false; - if (this.deferredRebuild != that.deferredRebuild) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case INDEXNAME: - if (field.type == TType.STRING) { - this.indexName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEXHANDLERCLASS: - if (field.type == TType.STRING) { - this.indexHandlerClass = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DBNAME: - if (field.type == TType.STRING) { - this.dbName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ORIGTABLENAME: - if (field.type == TType.STRING) { - this.origTableName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case CREATETIME: - if (field.type == TType.I32) { - this.createTime = iprot.readI32(); - this.__isset.createTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LASTACCESSTIME: - if (field.type == TType.I32) { - this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEXTABLENAME: - if (field.type == TType.STRING) { - this.indexTableName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SD: - if (field.type == TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARAMETERS: - if (field.type == TType.MAP) { - { - TMap _map44 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) - { - String _key46; - String _val47; - _key46 = iprot.readString(); - _val47 = iprot.readString(); - this.parameters.put(_key46, _val47); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DEFERREDREBUILD: - if (field.type == TType.BOOL) { - this.deferredRebuild = iprot.readBool(); - this.__isset.deferredRebuild = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.indexName != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.indexName); - oprot.writeFieldEnd(); - } - if (this.indexHandlerClass != null) { - oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); - oprot.writeString(this.indexHandlerClass); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.origTableName != null) { - oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.origTableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.indexTableName != null) { - oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.indexTableName); - oprot.writeFieldEnd(); - } - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); - oprot.writeBool(this.deferredRebuild); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Index("); - boolean first = true; - - sb.append("indexName:"); - if (this.indexName == null) { - sb.append("null"); - } else { - sb.append(this.indexName); - } - first = false; - if (!first) sb.append(", "); - sb.append("indexHandlerClass:"); - if (this.indexHandlerClass == null) { - sb.append("null"); - } else { - sb.append(this.indexHandlerClass); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("origTableName:"); - if (this.origTableName == null) { - sb.append("null"); - } else { - sb.append(this.origTableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("indexTableName:"); - if (this.indexTableName == null) { - sb.append("null"); - } else { - sb.append(this.indexTableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (!first) sb.append(", "); - sb.append("deferredRebuild:"); - sb.append(this.deferredRebuild); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java deleted file mode 100644 index 2692975..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(IndexAlreadyExistsException.class, metaDataMap); - } - - public IndexAlreadyExistsException() { - } - - public IndexAlreadyExistsException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public IndexAlreadyExistsException(IndexAlreadyExistsException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public IndexAlreadyExistsException clone() { - return new IndexAlreadyExistsException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof IndexAlreadyExistsException) - return this.equals((IndexAlreadyExistsException)that); - return false; - } - - public boolean equals(IndexAlreadyExistsException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("IndexAlreadyExistsException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 22fba01..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(InvalidObjectException.class, metaDataMap); - } - - public InvalidObjectException() { - } - - public InvalidObjectException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidObjectException(InvalidObjectException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public InvalidObjectException clone() { - return new InvalidObjectException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidObjectException) - return this.equals((InvalidObjectException)that); - return false; - } - - public boolean equals(InvalidObjectException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("InvalidObjectException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 94af63f..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(InvalidOperationException.class, metaDataMap); - } - - public InvalidOperationException() { - } - - public InvalidOperationException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidOperationException(InvalidOperationException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public InvalidOperationException clone() { - return new InvalidOperationException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidOperationException) - return this.equals((InvalidOperationException)that); - return false; - } - - public boolean equals(InvalidOperationException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("InvalidOperationException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index dc93f70..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(MetaException.class, metaDataMap); - } - - public MetaException() { - } - - public MetaException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public MetaException(MetaException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public MetaException clone() { - return new MetaException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof MetaException) - return this.equals((MetaException)that); - return false; - } - - public boolean equals(MetaException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("MetaException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 2864638..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(NoSuchObjectException.class, metaDataMap); - } - - public NoSuchObjectException() { - } - - public NoSuchObjectException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public NoSuchObjectException(NoSuchObjectException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public NoSuchObjectException clone() { - return new NoSuchObjectException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NoSuchObjectException) - return this.equals((NoSuchObjectException)that); - return false; - } - - public boolean equals(NoSuchObjectException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("NoSuchObjectException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 3537b55..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java +++ /dev/null @@ -1,277 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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; - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap); - } - - public Order() { - } - - public Order( - String col, - int order) - { - this(); - this.col = col; - this.order = order; - this.__isset.order = true; - } - - /** - * Performs a deep copy on other. - */ - public Order(Order other) { - if (other.isSetCol()) { - this.col = other.col; - } - __isset.order = other.__isset.order; - this.order = other.order; - } - - @Override - public Order clone() { - return new Order(this); - } - - public String getCol() { - return this.col; - } - - public void setCol(String col) { - this.col = col; - } - - public void unsetCol() { - this.col = null; - } - - // Returns true if field col is set (has been asigned a value) and false otherwise - public boolean isSetCol() { - return this.col != null; - } - - public int getOrder() { - return this.order; - } - - public void setOrder(int order) { - this.order = order; - this.__isset.order = true; - } - - public void unsetOrder() { - this.__isset.order = false; - } - - // Returns true if field order is set (has been asigned a value) and false otherwise - public boolean isSetOrder() { - return this.__isset.order; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case COL: - if (value == null) { - unsetCol(); - } else { - setCol((String)value); - } - break; - - case ORDER: - if (value == null) { - unsetOrder(); - } else { - setOrder((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case COL: - return getCol(); - - case ORDER: - return new Integer(getOrder()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case COL: - return isSetCol(); - case ORDER: - return isSetOrder(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Order) - return this.equals((Order)that); - return false; - } - - public boolean equals(Order that) { - if (that == null) - return false; - - boolean this_present_col = true && this.isSetCol(); - boolean that_present_col = true && that.isSetCol(); - if (this_present_col || that_present_col) { - if (!(this_present_col && that_present_col)) - return false; - if (!this.col.equals(that.col)) - return false; - } - - boolean this_present_order = true; - boolean that_present_order = true; - if (this_present_order || that_present_order) { - if (!(this_present_order && that_present_order)) - return false; - if (this.order != that.order) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case COL: - if (field.type == TType.STRING) { - this.col = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ORDER: - if (field.type == TType.I32) { - this.order = iprot.readI32(); - this.__isset.order = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.col != null) { - oprot.writeFieldBegin(COL_FIELD_DESC); - oprot.writeString(this.col); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ORDER_FIELD_DESC); - oprot.writeI32(this.order); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Order("); - boolean first = true; - - sb.append("col:"); - if (this.col == null) { - sb.append("null"); - } else { - sb.append(this.col); - } - first = false; - if (!first) sb.append(", "); - sb.append("order:"); - sb.append(this.order); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java deleted file mode 100644 index ce3d7b7..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java +++ /dev/null @@ -1,700 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)4); - private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5); - private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)6); - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(VALUES, new FieldMetaData("values", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); - } - - public Partition() { - } - - public Partition( - List values, - String dbName, - String tableName, - int createTime, - int lastAccessTime, - StorageDescriptor sd, - Map parameters) - { - this(); - this.values = values; - this.dbName = dbName; - this.tableName = tableName; - this.createTime = createTime; - this.__isset.createTime = true; - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - this.sd = sd; - this.parameters = parameters; - } - - /** - * Performs a deep copy on other. - */ - public Partition(Partition other) { - if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (String other_element : other.values) { - __this__values.add(other_element); - } - this.values = __this__values; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - 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); - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(); - for (Map.Entry other_element : other.parameters.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__parameters_copy_key = other_element_key; - - String __this__parameters_copy_value = other_element_value; - - __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); - } - this.parameters = __this__parameters; - } - } - - @Override - public Partition clone() { - return new Partition(this); - } - - public int getValuesSize() { - return (this.values == null) ? 0 : this.values.size(); - } - - public java.util.Iterator getValuesIterator() { - return (this.values == null) ? null : this.values.iterator(); - } - - public void addToValues(String elem) { - if (this.values == null) { - this.values = new ArrayList(); - } - this.values.add(elem); - } - - public List getValues() { - return this.values; - } - - public void setValues(List values) { - this.values = values; - } - - public void unsetValues() { - this.values = null; - } - - // Returns true if field values is set (has been asigned a value) and false otherwise - public boolean isSetValues() { - return this.values != null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - // Returns true if field dbName is set (has been asigned a value) and false otherwise - public boolean isSetDbName() { - return this.dbName != null; - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - // Returns true if field tableName is set (has been asigned a value) and false otherwise - public boolean isSetTableName() { - return this.tableName != null; - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - this.__isset.createTime = true; - } - - public void unsetCreateTime() { - this.__isset.createTime = false; - } - - // Returns true if field createTime is set (has been asigned a value) and false otherwise - public boolean isSetCreateTime() { - return this.__isset.createTime; - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - } - - public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; - } - - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise - public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - // Returns true if field sd is set (has been asigned a value) and false otherwise - public boolean isSetSd() { - return this.sd != null; - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - // 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) { - case VALUES: - if (value == null) { - unsetValues(); - } else { - setValues((List)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case CREATETIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LASTACCESSTIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case VALUES: - return getValues(); - - case DBNAME: - return getDbName(); - - case TABLENAME: - return getTableName(); - - case CREATETIME: - return new Integer(getCreateTime()); - - case LASTACCESSTIME: - return new Integer(getLastAccessTime()); - - case SD: - return getSd(); - - case PARAMETERS: - return getParameters(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case VALUES: - return isSetValues(); - case DBNAME: - return isSetDbName(); - case TABLENAME: - return isSetTableName(); - case CREATETIME: - return isSetCreateTime(); - case LASTACCESSTIME: - return isSetLastAccessTime(); - case SD: - return isSetSd(); - case PARAMETERS: - return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Partition) - return this.equals((Partition)that); - return false; - } - - public boolean equals(Partition that) { - if (that == null) - return false; - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case VALUES: - if (field.type == TType.LIST) { - { - TList _list35 = iprot.readListBegin(); - this.values = new ArrayList(_list35.size); - for (int _i36 = 0; _i36 < _list35.size; ++_i36) - { - String _elem37; - _elem37 = iprot.readString(); - this.values.add(_elem37); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DBNAME: - if (field.type == TType.STRING) { - this.dbName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TABLENAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case CREATETIME: - if (field.type == TType.I32) { - this.createTime = iprot.readI32(); - this.__isset.createTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LASTACCESSTIME: - if (field.type == TType.I32) { - this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SD: - if (field.type == TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARAMETERS: - if (field.type == TType.MAP) { - { - TMap _map38 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map38.size); - for (int _i39 = 0; _i39 < _map38.size; ++_i39) - { - String _key40; - String _val41; - _key40 = iprot.readString(); - _val41 = iprot.readString(); - this.parameters.put(_key40, _val41); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.values.size())); - for (String _iter42 : this.values) { - oprot.writeString(_iter42); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter43 : this.parameters.entrySet()) { - oprot.writeString(_iter43.getKey()); - oprot.writeString(_iter43.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Partition("); - boolean first = true; - - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - sb.append(this.values); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java deleted file mode 100644 index 21b6439..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELDSCHEMAS, new FieldMetaData("fieldSchemas", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(PROPERTIES, new FieldMetaData("properties", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap); - } - - public Schema() { - } - - public Schema( - List fieldSchemas, - Map properties) - { - this(); - this.fieldSchemas = fieldSchemas; - this.properties = properties; - } - - /** - * Performs a deep copy on other. - */ - public Schema(Schema other) { - if (other.isSetFieldSchemas()) { - List __this__fieldSchemas = new ArrayList(); - for (FieldSchema other_element : other.fieldSchemas) { - __this__fieldSchemas.add(new FieldSchema(other_element)); - } - this.fieldSchemas = __this__fieldSchemas; - } - if (other.isSetProperties()) { - Map __this__properties = new HashMap(); - for (Map.Entry other_element : other.properties.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__properties_copy_key = other_element_key; - - String __this__properties_copy_value = other_element_value; - - __this__properties.put(__this__properties_copy_key, __this__properties_copy_value); - } - this.properties = __this__properties; - } - } - - @Override - public Schema clone() { - return new Schema(this); - } - - public int getFieldSchemasSize() { - return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size(); - } - - public java.util.Iterator getFieldSchemasIterator() { - return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator(); - } - - public void addToFieldSchemas(FieldSchema elem) { - if (this.fieldSchemas == null) { - this.fieldSchemas = new ArrayList(); - } - this.fieldSchemas.add(elem); - } - - public List getFieldSchemas() { - return this.fieldSchemas; - } - - public void setFieldSchemas(List fieldSchemas) { - this.fieldSchemas = fieldSchemas; - } - - public void unsetFieldSchemas() { - this.fieldSchemas = null; - } - - // Returns true if field fieldSchemas is set (has been asigned a value) and false otherwise - public boolean isSetFieldSchemas() { - return this.fieldSchemas != null; - } - - public int getPropertiesSize() { - return (this.properties == null) ? 0 : this.properties.size(); - } - - public void putToProperties(String key, String val) { - if (this.properties == null) { - this.properties = new HashMap(); - } - this.properties.put(key, val); - } - - public Map getProperties() { - return this.properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public void unsetProperties() { - this.properties = null; - } - - // 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: - if (value == null) { - unsetFieldSchemas(); - } else { - setFieldSchemas((List)value); - } - break; - - case PROPERTIES: - if (value == null) { - unsetProperties(); - } else { - setProperties((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELDSCHEMAS: - return getFieldSchemas(); - - case PROPERTIES: - return getProperties(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELDSCHEMAS: - return isSetFieldSchemas(); - case PROPERTIES: - return isSetProperties(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Schema) - return this.equals((Schema)that); - return false; - } - - public boolean equals(Schema that) { - if (that == null) - return false; - - boolean this_present_fieldSchemas = true && this.isSetFieldSchemas(); - boolean that_present_fieldSchemas = true && that.isSetFieldSchemas(); - if (this_present_fieldSchemas || that_present_fieldSchemas) { - if (!(this_present_fieldSchemas && that_present_fieldSchemas)) - return false; - if (!this.fieldSchemas.equals(that.fieldSchemas)) - return false; - } - - boolean this_present_properties = true && this.isSetProperties(); - boolean that_present_properties = true && that.isSetProperties(); - if (this_present_properties || that_present_properties) { - if (!(this_present_properties && that_present_properties)) - return false; - if (!this.properties.equals(that.properties)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case FIELDSCHEMAS: - if (field.type == TType.LIST) { - { - TList _list49 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list49.size); - for (int _i50 = 0; _i50 < _list49.size; ++_i50) - { - FieldSchema _elem51; - _elem51 = new FieldSchema(); - _elem51.read(iprot); - this.fieldSchemas.add(_elem51); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PROPERTIES: - if (field.type == TType.MAP) { - { - TMap _map52 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map52.size); - for (int _i53 = 0; _i53 < _map52.size; ++_i53) - { - String _key54; - String _val55; - _key54 = iprot.readString(); - _val55 = iprot.readString(); - this.properties.put(_key54, _val55); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.fieldSchemas != null) { - oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter56 : this.fieldSchemas) { - _iter56.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.properties != null) { - oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size())); - for (Map.Entry _iter57 : this.properties.entrySet()) { - oprot.writeString(_iter57.getKey()); - oprot.writeString(_iter57.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Schema("); - boolean first = true; - - sb.append("fieldSchemas:"); - if (this.fieldSchemas == null) { - sb.append("null"); - } else { - sb.append(this.fieldSchemas); - } - first = false; - if (!first) sb.append(", "); - sb.append("properties:"); - if (this.properties == null) { - sb.append("null"); - } else { - sb.append(this.properties); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java deleted file mode 100755 index e4caece..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(SERIALIZATIONLIB, new FieldMetaData("serializationLib", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(SerDeInfo.class, metaDataMap); - } - - public SerDeInfo() { - } - - public SerDeInfo( - String name, - String serializationLib, - Map parameters) - { - this(); - this.name = name; - this.serializationLib = serializationLib; - this.parameters = parameters; - } - - /** - * Performs a deep copy on other. - */ - public SerDeInfo(SerDeInfo other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetSerializationLib()) { - this.serializationLib = other.serializationLib; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(); - for (Map.Entry other_element : other.parameters.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__parameters_copy_key = other_element_key; - - String __this__parameters_copy_value = other_element_value; - - __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); - } - this.parameters = __this__parameters; - } - } - - @Override - public SerDeInfo clone() { - return new SerDeInfo(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public String getSerializationLib() { - return this.serializationLib; - } - - public void setSerializationLib(String serializationLib) { - this.serializationLib = serializationLib; - } - - public void unsetSerializationLib() { - this.serializationLib = null; - } - - // Returns true if field serializationLib is set (has been asigned a value) and false otherwise - public boolean isSetSerializationLib() { - return this.serializationLib != null; - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case SERIALIZATIONLIB: - if (value == null) { - unsetSerializationLib(); - } else { - setSerializationLib((String)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case SERIALIZATIONLIB: - return getSerializationLib(); - - case PARAMETERS: - return getParameters(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case SERIALIZATIONLIB: - return isSetSerializationLib(); - case PARAMETERS: - return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SerDeInfo) - return this.equals((SerDeInfo)that); - return false; - } - - public boolean equals(SerDeInfo that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_serializationLib = true && this.isSetSerializationLib(); - boolean that_present_serializationLib = true && that.isSetSerializationLib(); - if (this_present_serializationLib || that_present_serializationLib) { - if (!(this_present_serializationLib && that_present_serializationLib)) - return false; - if (!this.serializationLib.equals(that.serializationLib)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SERIALIZATIONLIB: - if (field.type == TType.STRING) { - this.serializationLib = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARAMETERS: - if (field.type == TType.MAP) { - { - TMap _map4 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map4.size); - for (int _i5 = 0; _i5 < _map4.size; ++_i5) - { - String _key6; - String _val7; - _key6 = iprot.readString(); - _val7 = iprot.readString(); - this.parameters.put(_key6, _val7); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.serializationLib != null) { - oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); - oprot.writeString(this.serializationLib); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter8 : this.parameters.entrySet()) { - oprot.writeString(_iter8.getKey()); - oprot.writeString(_iter8.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("SerDeInfo("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("serializationLib:"); - if (this.serializationLib == null) { - sb.append("null"); - } else { - sb.append(this.serializationLib); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java deleted file mode 100644 index 10976e4..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java +++ /dev/null @@ -1,981 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField OUTPUT_FORMAT_FIELD_DESC = new TField("outputFormat", TType.STRING, (short)4); - private static final TField COMPRESSED_FIELD_DESC = new TField("compressed", TType.BOOL, (short)5); - private static final TField NUM_BUCKETS_FIELD_DESC = new TField("numBuckets", TType.I32, (short)6); - private static final TField SERDE_INFO_FIELD_DESC = new TField("serdeInfo", TType.STRUCT, (short)7); - private static final TField BUCKET_COLS_FIELD_DESC = new TField("bucketCols", TType.LIST, (short)8); - private static final TField SORT_COLS_FIELD_DESC = new TField("sortCols", TType.LIST, (short)9); - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(COLS, new FieldMetaData("cols", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INPUTFORMAT, new FieldMetaData("inputFormat", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(OUTPUTFORMAT, new FieldMetaData("outputFormat", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(COMPRESSED, new FieldMetaData("compressed", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(NUMBUCKETS, new FieldMetaData("numBuckets", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(SERDEINFO, new FieldMetaData("serdeInfo", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, SerDeInfo.class))); - put(BUCKETCOLS, new FieldMetaData("bucketCols", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(SORTCOLS, new FieldMetaData("sortCols", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Order.class)))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(StorageDescriptor.class, metaDataMap); - } - - public StorageDescriptor() { - } - - public StorageDescriptor( - List cols, - String location, - String inputFormat, - String outputFormat, - boolean compressed, - int numBuckets, - SerDeInfo serdeInfo, - List bucketCols, - List sortCols, - Map parameters) - { - this(); - this.cols = cols; - this.location = location; - this.inputFormat = inputFormat; - this.outputFormat = outputFormat; - this.compressed = compressed; - this.__isset.compressed = true; - this.numBuckets = numBuckets; - this.__isset.numBuckets = true; - this.serdeInfo = serdeInfo; - this.bucketCols = bucketCols; - this.sortCols = sortCols; - this.parameters = parameters; - } - - /** - * Performs a deep copy on other. - */ - public StorageDescriptor(StorageDescriptor other) { - if (other.isSetCols()) { - List __this__cols = new ArrayList(); - for (FieldSchema other_element : other.cols) { - __this__cols.add(new FieldSchema(other_element)); - } - this.cols = __this__cols; - } - if (other.isSetLocation()) { - this.location = other.location; - } - if (other.isSetInputFormat()) { - this.inputFormat = other.inputFormat; - } - 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); - } - if (other.isSetBucketCols()) { - List __this__bucketCols = new ArrayList(); - for (String other_element : other.bucketCols) { - __this__bucketCols.add(other_element); - } - this.bucketCols = __this__bucketCols; - } - if (other.isSetSortCols()) { - List __this__sortCols = new ArrayList(); - for (Order other_element : other.sortCols) { - __this__sortCols.add(new Order(other_element)); - } - this.sortCols = __this__sortCols; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(); - for (Map.Entry other_element : other.parameters.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__parameters_copy_key = other_element_key; - - String __this__parameters_copy_value = other_element_value; - - __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); - } - this.parameters = __this__parameters; - } - } - - @Override - public StorageDescriptor clone() { - return new StorageDescriptor(this); - } - - public int getColsSize() { - return (this.cols == null) ? 0 : this.cols.size(); - } - - public java.util.Iterator getColsIterator() { - return (this.cols == null) ? null : this.cols.iterator(); - } - - public void addToCols(FieldSchema elem) { - if (this.cols == null) { - this.cols = new ArrayList(); - } - this.cols.add(elem); - } - - public List getCols() { - return this.cols; - } - - public void setCols(List cols) { - this.cols = cols; - } - - public void unsetCols() { - this.cols = null; - } - - // Returns true if field cols is set (has been asigned a value) and false otherwise - public boolean isSetCols() { - return this.cols != null; - } - - public String getLocation() { - return this.location; - } - - public void setLocation(String location) { - this.location = location; - } - - public void unsetLocation() { - this.location = null; - } - - // Returns true if field location is set (has been asigned a value) and false otherwise - public boolean isSetLocation() { - return this.location != null; - } - - public String getInputFormat() { - return this.inputFormat; - } - - public void setInputFormat(String inputFormat) { - this.inputFormat = inputFormat; - } - - public void unsetInputFormat() { - this.inputFormat = null; - } - - // Returns true if field inputFormat is set (has been asigned a value) and false otherwise - public boolean isSetInputFormat() { - return this.inputFormat != null; - } - - public String getOutputFormat() { - return this.outputFormat; - } - - public void setOutputFormat(String outputFormat) { - this.outputFormat = outputFormat; - } - - public void unsetOutputFormat() { - this.outputFormat = null; - } - - // Returns true if field outputFormat is set (has been asigned a value) and false otherwise - public boolean isSetOutputFormat() { - return this.outputFormat != null; - } - - public boolean isCompressed() { - return this.compressed; - } - - public void setCompressed(boolean compressed) { - this.compressed = compressed; - this.__isset.compressed = true; - } - - public void unsetCompressed() { - this.__isset.compressed = false; - } - - // Returns true if field compressed is set (has been asigned a value) and false otherwise - public boolean isSetCompressed() { - return this.__isset.compressed; - } - - public int getNumBuckets() { - return this.numBuckets; - } - - public void setNumBuckets(int numBuckets) { - this.numBuckets = numBuckets; - this.__isset.numBuckets = true; - } - - public void unsetNumBuckets() { - this.__isset.numBuckets = false; - } - - // Returns true if field numBuckets is set (has been asigned a value) and false otherwise - public boolean isSetNumBuckets() { - return this.__isset.numBuckets; - } - - public SerDeInfo getSerdeInfo() { - return this.serdeInfo; - } - - public void setSerdeInfo(SerDeInfo serdeInfo) { - this.serdeInfo = serdeInfo; - } - - public void unsetSerdeInfo() { - this.serdeInfo = null; - } - - // Returns true if field serdeInfo is set (has been asigned a value) and false otherwise - public boolean isSetSerdeInfo() { - return this.serdeInfo != null; - } - - public int getBucketColsSize() { - return (this.bucketCols == null) ? 0 : this.bucketCols.size(); - } - - public java.util.Iterator getBucketColsIterator() { - return (this.bucketCols == null) ? null : this.bucketCols.iterator(); - } - - public void addToBucketCols(String elem) { - if (this.bucketCols == null) { - this.bucketCols = new ArrayList(); - } - this.bucketCols.add(elem); - } - - public List getBucketCols() { - return this.bucketCols; - } - - public void setBucketCols(List bucketCols) { - this.bucketCols = bucketCols; - } - - public void unsetBucketCols() { - this.bucketCols = null; - } - - // Returns true if field bucketCols is set (has been asigned a value) and false otherwise - public boolean isSetBucketCols() { - return this.bucketCols != null; - } - - public int getSortColsSize() { - return (this.sortCols == null) ? 0 : this.sortCols.size(); - } - - public java.util.Iterator getSortColsIterator() { - return (this.sortCols == null) ? null : this.sortCols.iterator(); - } - - public void addToSortCols(Order elem) { - if (this.sortCols == null) { - this.sortCols = new ArrayList(); - } - this.sortCols.add(elem); - } - - public List getSortCols() { - return this.sortCols; - } - - public void setSortCols(List sortCols) { - this.sortCols = sortCols; - } - - public void unsetSortCols() { - this.sortCols = null; - } - - // Returns true if field sortCols is set (has been asigned a value) and false otherwise - public boolean isSetSortCols() { - return this.sortCols != null; - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - // 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) { - case COLS: - if (value == null) { - unsetCols(); - } else { - setCols((List)value); - } - break; - - case LOCATION: - if (value == null) { - unsetLocation(); - } else { - setLocation((String)value); - } - break; - - case INPUTFORMAT: - if (value == null) { - unsetInputFormat(); - } else { - setInputFormat((String)value); - } - break; - - case OUTPUTFORMAT: - if (value == null) { - unsetOutputFormat(); - } else { - setOutputFormat((String)value); - } - break; - - case COMPRESSED: - if (value == null) { - unsetCompressed(); - } else { - setCompressed((Boolean)value); - } - break; - - case NUMBUCKETS: - if (value == null) { - unsetNumBuckets(); - } else { - setNumBuckets((Integer)value); - } - break; - - case SERDEINFO: - if (value == null) { - unsetSerdeInfo(); - } else { - setSerdeInfo((SerDeInfo)value); - } - break; - - case BUCKETCOLS: - if (value == null) { - unsetBucketCols(); - } else { - setBucketCols((List)value); - } - break; - - case SORTCOLS: - if (value == null) { - unsetSortCols(); - } else { - setSortCols((List)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case COLS: - return getCols(); - - case LOCATION: - return getLocation(); - - case INPUTFORMAT: - return getInputFormat(); - - case OUTPUTFORMAT: - return getOutputFormat(); - - case COMPRESSED: - return new Boolean(isCompressed()); - - case NUMBUCKETS: - return new Integer(getNumBuckets()); - - case SERDEINFO: - return getSerdeInfo(); - - case BUCKETCOLS: - return getBucketCols(); - - case SORTCOLS: - return getSortCols(); - - case PARAMETERS: - return getParameters(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case COLS: - return isSetCols(); - case LOCATION: - return isSetLocation(); - case INPUTFORMAT: - return isSetInputFormat(); - case OUTPUTFORMAT: - return isSetOutputFormat(); - case COMPRESSED: - return isSetCompressed(); - case NUMBUCKETS: - return isSetNumBuckets(); - case SERDEINFO: - return isSetSerdeInfo(); - case BUCKETCOLS: - return isSetBucketCols(); - case SORTCOLS: - return isSetSortCols(); - case PARAMETERS: - return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof StorageDescriptor) - return this.equals((StorageDescriptor)that); - return false; - } - - public boolean equals(StorageDescriptor that) { - if (that == null) - return false; - - boolean this_present_cols = true && this.isSetCols(); - boolean that_present_cols = true && that.isSetCols(); - if (this_present_cols || that_present_cols) { - if (!(this_present_cols && that_present_cols)) - return false; - if (!this.cols.equals(that.cols)) - return false; - } - - boolean this_present_location = true && this.isSetLocation(); - boolean that_present_location = true && that.isSetLocation(); - if (this_present_location || that_present_location) { - if (!(this_present_location && that_present_location)) - return false; - if (!this.location.equals(that.location)) - return false; - } - - boolean this_present_inputFormat = true && this.isSetInputFormat(); - boolean that_present_inputFormat = true && that.isSetInputFormat(); - if (this_present_inputFormat || that_present_inputFormat) { - if (!(this_present_inputFormat && that_present_inputFormat)) - return false; - if (!this.inputFormat.equals(that.inputFormat)) - return false; - } - - boolean this_present_outputFormat = true && this.isSetOutputFormat(); - boolean that_present_outputFormat = true && that.isSetOutputFormat(); - if (this_present_outputFormat || that_present_outputFormat) { - if (!(this_present_outputFormat && that_present_outputFormat)) - return false; - if (!this.outputFormat.equals(that.outputFormat)) - return false; - } - - boolean this_present_compressed = true; - boolean that_present_compressed = true; - if (this_present_compressed || that_present_compressed) { - if (!(this_present_compressed && that_present_compressed)) - return false; - if (this.compressed != that.compressed) - return false; - } - - boolean this_present_numBuckets = true; - boolean that_present_numBuckets = true; - if (this_present_numBuckets || that_present_numBuckets) { - if (!(this_present_numBuckets && that_present_numBuckets)) - return false; - if (this.numBuckets != that.numBuckets) - return false; - } - - boolean this_present_serdeInfo = true && this.isSetSerdeInfo(); - boolean that_present_serdeInfo = true && that.isSetSerdeInfo(); - if (this_present_serdeInfo || that_present_serdeInfo) { - if (!(this_present_serdeInfo && that_present_serdeInfo)) - return false; - if (!this.serdeInfo.equals(that.serdeInfo)) - return false; - } - - boolean this_present_bucketCols = true && this.isSetBucketCols(); - boolean that_present_bucketCols = true && that.isSetBucketCols(); - if (this_present_bucketCols || that_present_bucketCols) { - if (!(this_present_bucketCols && that_present_bucketCols)) - return false; - if (!this.bucketCols.equals(that.bucketCols)) - return false; - } - - boolean this_present_sortCols = true && this.isSetSortCols(); - boolean that_present_sortCols = true && that.isSetSortCols(); - if (this_present_sortCols || that_present_sortCols) { - if (!(this_present_sortCols && that_present_sortCols)) - return false; - if (!this.sortCols.equals(that.sortCols)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case COLS: - if (field.type == TType.LIST) { - { - TList _list9 = iprot.readListBegin(); - this.cols = new ArrayList(_list9.size); - for (int _i10 = 0; _i10 < _list9.size; ++_i10) - { - FieldSchema _elem11; - _elem11 = new FieldSchema(); - _elem11.read(iprot); - this.cols.add(_elem11); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LOCATION: - if (field.type == TType.STRING) { - this.location = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INPUTFORMAT: - if (field.type == TType.STRING) { - this.inputFormat = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OUTPUTFORMAT: - if (field.type == TType.STRING) { - this.outputFormat = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COMPRESSED: - if (field.type == TType.BOOL) { - this.compressed = iprot.readBool(); - this.__isset.compressed = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NUMBUCKETS: - if (field.type == TType.I32) { - this.numBuckets = iprot.readI32(); - this.__isset.numBuckets = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SERDEINFO: - if (field.type == TType.STRUCT) { - this.serdeInfo = new SerDeInfo(); - this.serdeInfo.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BUCKETCOLS: - if (field.type == TType.LIST) { - { - TList _list12 = iprot.readListBegin(); - this.bucketCols = new ArrayList(_list12.size); - for (int _i13 = 0; _i13 < _list12.size; ++_i13) - { - String _elem14; - _elem14 = iprot.readString(); - this.bucketCols.add(_elem14); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SORTCOLS: - if (field.type == TType.LIST) { - { - TList _list15 = iprot.readListBegin(); - this.sortCols = new ArrayList(_list15.size); - for (int _i16 = 0; _i16 < _list15.size; ++_i16) - { - Order _elem17; - _elem17 = new Order(); - _elem17.read(iprot); - this.sortCols.add(_elem17); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARAMETERS: - if (field.type == TType.MAP) { - { - TMap _map18 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map18.size); - for (int _i19 = 0; _i19 < _map18.size; ++_i19) - { - String _key20; - String _val21; - _key20 = iprot.readString(); - _val21 = iprot.readString(); - this.parameters.put(_key20, _val21); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.cols != null) { - oprot.writeFieldBegin(COLS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size())); - for (FieldSchema _iter22 : this.cols) { - _iter22.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.location != null) { - oprot.writeFieldBegin(LOCATION_FIELD_DESC); - oprot.writeString(this.location); - oprot.writeFieldEnd(); - } - if (this.inputFormat != null) { - oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.inputFormat); - oprot.writeFieldEnd(); - } - if (this.outputFormat != null) { - oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.outputFormat); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); - oprot.writeBool(this.compressed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); - oprot.writeI32(this.numBuckets); - oprot.writeFieldEnd(); - if (this.serdeInfo != null) { - oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); - this.serdeInfo.write(oprot); - oprot.writeFieldEnd(); - } - if (this.bucketCols != null) { - oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size())); - for (String _iter23 : this.bucketCols) { - oprot.writeString(_iter23); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.sortCols != null) { - oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size())); - for (Order _iter24 : this.sortCols) { - _iter24.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter25 : this.parameters.entrySet()) { - oprot.writeString(_iter25.getKey()); - oprot.writeString(_iter25.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("StorageDescriptor("); - boolean first = true; - - sb.append("cols:"); - if (this.cols == null) { - sb.append("null"); - } else { - sb.append(this.cols); - } - first = false; - if (!first) sb.append(", "); - sb.append("location:"); - if (this.location == null) { - sb.append("null"); - } else { - sb.append(this.location); - } - first = false; - if (!first) sb.append(", "); - sb.append("inputFormat:"); - if (this.inputFormat == null) { - sb.append("null"); - } else { - sb.append(this.inputFormat); - } - first = false; - if (!first) sb.append(", "); - sb.append("outputFormat:"); - if (this.outputFormat == null) { - sb.append("null"); - } else { - sb.append(this.outputFormat); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressed:"); - sb.append(this.compressed); - first = false; - if (!first) sb.append(", "); - sb.append("numBuckets:"); - sb.append(this.numBuckets); - first = false; - if (!first) sb.append(", "); - sb.append("serdeInfo:"); - if (this.serdeInfo == null) { - sb.append("null"); - } else { - sb.append(this.serdeInfo); - } - first = false; - if (!first) sb.append(", "); - sb.append("bucketCols:"); - if (this.bucketCols == null) { - sb.append("null"); - } else { - sb.append(this.bucketCols); - } - first = false; - if (!first) sb.append(", "); - sb.append("sortCols:"); - if (this.sortCols == null) { - sb.append("null"); - } else { - sb.append(this.sortCols); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java deleted file mode 100644 index d89f0f2..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java +++ /dev/null @@ -1,1043 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)4); - private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5); - private static final TField RETENTION_FIELD_DESC = new TField("retention", TType.I32, (short)6); - private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)7); - private static final TField PARTITION_KEYS_FIELD_DESC = new TField("partitionKeys", TType.LIST, (short)8); - private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)9); - private static final TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new TField("viewOriginalText", TType.STRING, (short)10); - private static final TField VIEW_EXPANDED_TEXT_FIELD_DESC = new TField("viewExpandedText", TType.STRING, (short)11); - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(RETENTION, new FieldMetaData("retention", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(PARTITIONKEYS, new FieldMetaData("partitionKeys", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(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, - new FieldValueMetaData(TType.STRING))); - put(VIEWEXPANDEDTEXT, new FieldMetaData("viewExpandedText", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TABLETYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); - } - - public Table() { - } - - public Table( - String tableName, - String dbName, - String owner, - int createTime, - int lastAccessTime, - int retention, - StorageDescriptor sd, - List partitionKeys, - Map parameters, - String viewOriginalText, - String viewExpandedText, - String tableType) - { - this(); - this.tableName = tableName; - this.dbName = dbName; - this.owner = owner; - this.createTime = createTime; - this.__isset.createTime = true; - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - this.retention = retention; - this.__isset.retention = true; - this.sd = sd; - this.partitionKeys = partitionKeys; - this.parameters = parameters; - this.viewOriginalText = viewOriginalText; - this.viewExpandedText = viewExpandedText; - this.tableType = tableType; - } - - /** - * Performs a deep copy on other. - */ - public Table(Table other) { - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - 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); - } - if (other.isSetPartitionKeys()) { - List __this__partitionKeys = new ArrayList(); - for (FieldSchema other_element : other.partitionKeys) { - __this__partitionKeys.add(new FieldSchema(other_element)); - } - this.partitionKeys = __this__partitionKeys; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(); - for (Map.Entry other_element : other.parameters.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__parameters_copy_key = other_element_key; - - String __this__parameters_copy_value = other_element_value; - - __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); - } - this.parameters = __this__parameters; - } - if (other.isSetViewOriginalText()) { - this.viewOriginalText = other.viewOriginalText; - } - if (other.isSetViewExpandedText()) { - this.viewExpandedText = other.viewExpandedText; - } - if (other.isSetTableType()) { - this.tableType = other.tableType; - } - } - - @Override - public Table clone() { - return new Table(this); - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - // Returns true if field tableName is set (has been asigned a value) and false otherwise - public boolean isSetTableName() { - return this.tableName != null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - // Returns true if field dbName is set (has been asigned a value) and false otherwise - public boolean isSetDbName() { - return this.dbName != null; - } - - public String getOwner() { - return this.owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - public void unsetOwner() { - this.owner = null; - } - - // Returns true if field owner is set (has been asigned a value) and false otherwise - public boolean isSetOwner() { - return this.owner != null; - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - this.__isset.createTime = true; - } - - public void unsetCreateTime() { - this.__isset.createTime = false; - } - - // Returns true if field createTime is set (has been asigned a value) and false otherwise - public boolean isSetCreateTime() { - return this.__isset.createTime; - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; - } - - public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; - } - - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise - public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; - } - - public int getRetention() { - return this.retention; - } - - public void setRetention(int retention) { - this.retention = retention; - this.__isset.retention = true; - } - - public void unsetRetention() { - this.__isset.retention = false; - } - - // Returns true if field retention is set (has been asigned a value) and false otherwise - public boolean isSetRetention() { - return this.__isset.retention; - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - // Returns true if field sd is set (has been asigned a value) and false otherwise - public boolean isSetSd() { - return this.sd != null; - } - - public int getPartitionKeysSize() { - return (this.partitionKeys == null) ? 0 : this.partitionKeys.size(); - } - - public java.util.Iterator getPartitionKeysIterator() { - return (this.partitionKeys == null) ? null : this.partitionKeys.iterator(); - } - - public void addToPartitionKeys(FieldSchema elem) { - if (this.partitionKeys == null) { - this.partitionKeys = new ArrayList(); - } - this.partitionKeys.add(elem); - } - - public List getPartitionKeys() { - return this.partitionKeys; - } - - public void setPartitionKeys(List partitionKeys) { - this.partitionKeys = partitionKeys; - } - - public void unsetPartitionKeys() { - this.partitionKeys = null; - } - - // Returns true if field partitionKeys is set (has been asigned a value) and false otherwise - public boolean isSetPartitionKeys() { - return this.partitionKeys != null; - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - // Returns true if field parameters is set (has been asigned a value) and false otherwise - public boolean isSetParameters() { - return this.parameters != null; - } - - public String getViewOriginalText() { - return this.viewOriginalText; - } - - public void setViewOriginalText(String viewOriginalText) { - this.viewOriginalText = viewOriginalText; - } - - public void unsetViewOriginalText() { - this.viewOriginalText = null; - } - - // Returns true if field viewOriginalText is set (has been asigned a value) and false otherwise - public boolean isSetViewOriginalText() { - return this.viewOriginalText != null; - } - - public String getViewExpandedText() { - return this.viewExpandedText; - } - - public void setViewExpandedText(String viewExpandedText) { - this.viewExpandedText = viewExpandedText; - } - - public void unsetViewExpandedText() { - this.viewExpandedText = null; - } - - // Returns true if field viewExpandedText is set (has been asigned a value) and false otherwise - public boolean isSetViewExpandedText() { - return this.viewExpandedText != null; - } - - public String getTableType() { - return this.tableType; - } - - public void setTableType(String tableType) { - this.tableType = tableType; - } - - public void unsetTableType() { - this.tableType = null; - } - - // 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: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case OWNER: - if (value == null) { - unsetOwner(); - } else { - setOwner((String)value); - } - break; - - case CREATETIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LASTACCESSTIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case RETENTION: - if (value == null) { - unsetRetention(); - } else { - setRetention((Integer)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARTITIONKEYS: - if (value == null) { - unsetPartitionKeys(); - } else { - setPartitionKeys((List)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case VIEWORIGINALTEXT: - if (value == null) { - unsetViewOriginalText(); - } else { - setViewOriginalText((String)value); - } - break; - - case VIEWEXPANDEDTEXT: - if (value == null) { - unsetViewExpandedText(); - } else { - setViewExpandedText((String)value); - } - break; - - case TABLETYPE: - if (value == null) { - unsetTableType(); - } else { - setTableType((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TABLENAME: - return getTableName(); - - case DBNAME: - return getDbName(); - - case OWNER: - return getOwner(); - - case CREATETIME: - return new Integer(getCreateTime()); - - case LASTACCESSTIME: - return new Integer(getLastAccessTime()); - - case RETENTION: - return new Integer(getRetention()); - - case SD: - return getSd(); - - case PARTITIONKEYS: - return getPartitionKeys(); - - case PARAMETERS: - return getParameters(); - - case VIEWORIGINALTEXT: - return getViewOriginalText(); - - case VIEWEXPANDEDTEXT: - return getViewExpandedText(); - - case TABLETYPE: - return getTableType(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TABLENAME: - return isSetTableName(); - case DBNAME: - return isSetDbName(); - case OWNER: - return isSetOwner(); - case CREATETIME: - return isSetCreateTime(); - case LASTACCESSTIME: - return isSetLastAccessTime(); - case RETENTION: - return isSetRetention(); - case SD: - return isSetSd(); - case PARTITIONKEYS: - return isSetPartitionKeys(); - case PARAMETERS: - return isSetParameters(); - case VIEWORIGINALTEXT: - return isSetViewOriginalText(); - case VIEWEXPANDEDTEXT: - return isSetViewExpandedText(); - case TABLETYPE: - return isSetTableType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Table) - return this.equals((Table)that); - return false; - } - - public boolean equals(Table that) { - if (that == null) - return false; - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_owner = true && this.isSetOwner(); - boolean that_present_owner = true && that.isSetOwner(); - if (this_present_owner || that_present_owner) { - if (!(this_present_owner && that_present_owner)) - return false; - if (!this.owner.equals(that.owner)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_retention = true; - boolean that_present_retention = true; - if (this_present_retention || that_present_retention) { - if (!(this_present_retention && that_present_retention)) - return false; - if (this.retention != that.retention) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_partitionKeys = true && this.isSetPartitionKeys(); - boolean that_present_partitionKeys = true && that.isSetPartitionKeys(); - if (this_present_partitionKeys || that_present_partitionKeys) { - if (!(this_present_partitionKeys && that_present_partitionKeys)) - return false; - if (!this.partitionKeys.equals(that.partitionKeys)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_viewOriginalText = true && this.isSetViewOriginalText(); - boolean that_present_viewOriginalText = true && that.isSetViewOriginalText(); - if (this_present_viewOriginalText || that_present_viewOriginalText) { - if (!(this_present_viewOriginalText && that_present_viewOriginalText)) - return false; - if (!this.viewOriginalText.equals(that.viewOriginalText)) - return false; - } - - boolean this_present_viewExpandedText = true && this.isSetViewExpandedText(); - boolean that_present_viewExpandedText = true && that.isSetViewExpandedText(); - if (this_present_viewExpandedText || that_present_viewExpandedText) { - if (!(this_present_viewExpandedText && that_present_viewExpandedText)) - return false; - if (!this.viewExpandedText.equals(that.viewExpandedText)) - return false; - } - - boolean this_present_tableType = true && this.isSetTableType(); - boolean that_present_tableType = true && that.isSetTableType(); - if (this_present_tableType || that_present_tableType) { - if (!(this_present_tableType && that_present_tableType)) - return false; - if (!this.tableType.equals(that.tableType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TABLENAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DBNAME: - if (field.type == TType.STRING) { - this.dbName = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OWNER: - if (field.type == TType.STRING) { - this.owner = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case CREATETIME: - if (field.type == TType.I32) { - this.createTime = iprot.readI32(); - this.__isset.createTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LASTACCESSTIME: - if (field.type == TType.I32) { - this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case RETENTION: - if (field.type == TType.I32) { - this.retention = iprot.readI32(); - this.__isset.retention = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SD: - if (field.type == TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARTITIONKEYS: - if (field.type == TType.LIST) { - { - TList _list26 = iprot.readListBegin(); - this.partitionKeys = new ArrayList(_list26.size); - for (int _i27 = 0; _i27 < _list26.size; ++_i27) - { - FieldSchema _elem28; - _elem28 = new FieldSchema(); - _elem28.read(iprot); - this.partitionKeys.add(_elem28); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PARAMETERS: - if (field.type == TType.MAP) { - { - TMap _map29 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map29.size); - for (int _i30 = 0; _i30 < _map29.size; ++_i30) - { - String _key31; - String _val32; - _key31 = iprot.readString(); - _val32 = iprot.readString(); - this.parameters.put(_key31, _val32); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case VIEWORIGINALTEXT: - if (field.type == TType.STRING) { - this.viewOriginalText = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case VIEWEXPANDEDTEXT: - if (field.type == TType.STRING) { - this.viewExpandedText = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TABLETYPE: - if (field.type == TType.STRING) { - this.tableType = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.owner != null) { - oprot.writeFieldBegin(OWNER_FIELD_DESC); - oprot.writeString(this.owner); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RETENTION_FIELD_DESC); - oprot.writeI32(this.retention); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.partitionKeys != null) { - oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter33 : this.partitionKeys) { - _iter33.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter34 : this.parameters.entrySet()) { - oprot.writeString(_iter34.getKey()); - oprot.writeString(_iter34.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.viewOriginalText != null) { - oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); - oprot.writeString(this.viewOriginalText); - oprot.writeFieldEnd(); - } - if (this.viewExpandedText != null) { - oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); - oprot.writeString(this.viewExpandedText); - oprot.writeFieldEnd(); - } - if (this.tableType != null) { - oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); - oprot.writeString(this.tableType); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Table("); - boolean first = true; - - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("owner:"); - if (this.owner == null) { - sb.append("null"); - } else { - sb.append(this.owner); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("retention:"); - sb.append(this.retention); - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("partitionKeys:"); - if (this.partitionKeys == null) { - sb.append("null"); - } else { - sb.append(this.partitionKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (!first) sb.append(", "); - sb.append("viewOriginalText:"); - if (this.viewOriginalText == null) { - sb.append("null"); - } else { - sb.append(this.viewOriginalText); - } - first = false; - if (!first) sb.append(", "); - sb.append("viewExpandedText:"); - if (this.viewExpandedText == null) { - sb.append("null"); - } else { - sb.append(this.viewExpandedText); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableType:"); - if (this.tableType == null) { - sb.append("null"); - } else { - sb.append(this.tableType); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java deleted file mode 100644 index 545b64e..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ /dev/null @@ -1,26887 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class ThriftHiveMetastore { - - /** - * This interface is live. - */ - public interface Iface extends com.facebook.fb303.FacebookService.Iface { - - public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException; - - public Database get_database(String name) throws NoSuchObjectException, MetaException, TException; - - public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException; - - public List get_databases(String pattern) throws MetaException, TException; - - public List get_all_databases() throws MetaException, TException; - - public Type get_type(String name) throws MetaException, NoSuchObjectException, TException; - - public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, TException; - - public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException; - - public Map get_type_all(String name) throws MetaException, TException; - - public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException; - - public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException; - - public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException; - - public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; - - public List get_tables(String db_name, String pattern) throws MetaException, TException; - - public List get_all_tables(String db_name) throws MetaException, TException; - - public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException; - - public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException; - - public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; - - public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; - - public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; - - public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, TException; - - public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; - - public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, TException; - - public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException; - - public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException; - - public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException; - - public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; - - public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; - - public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException; - - public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, TException; - - public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, TException; - - public List partition_name_to_vals(String part_name) throws MetaException, TException; - - public Map partition_name_to_spec(String part_name) throws MetaException, TException; - - public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, TException; - - public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; - - public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, TException; - - public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, TException; - - public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException; - - } - - public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface { - public Client(TProtocol prot) - { - this(prot, prot); - } - - public Client(TProtocol iprot, TProtocol oprot) - { - super(iprot, oprot); - } - - public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException - { - send_create_database(database); - recv_create_database(); - } - - public void send_create_database(Database database) throws TException - { - oprot_.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, seqid_)); - create_database_args args = new create_database_args(); - args.database = database; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - create_database_result result = new create_database_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public Database get_database(String name) throws NoSuchObjectException, MetaException, TException - { - send_get_database(name); - return recv_get_database(); - } - - public void send_get_database(String name) throws TException - { - oprot_.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, seqid_)); - get_database_args args = new get_database_args(); - args.name = name; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Database recv_get_database() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_database_result result = new get_database_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); - } - - public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException - { - send_drop_database(name, deleteData); - recv_drop_database(); - } - - public void send_drop_database(String name, boolean deleteData) throws TException - { - oprot_.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, seqid_)); - drop_database_args args = new drop_database_args(); - args.name = name; - args.deleteData = deleteData; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_database_result result = new drop_database_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public List get_databases(String pattern) throws MetaException, TException - { - send_get_databases(pattern); - return recv_get_databases(); - } - - public void send_get_databases(String pattern) throws TException - { - oprot_.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, seqid_)); - get_databases_args args = new get_databases_args(); - args.pattern = pattern; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_databases() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_databases_result result = new get_databases_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); - } - - public List get_all_databases() throws MetaException, TException - { - send_get_all_databases(); - return recv_get_all_databases(); - } - - public void send_get_all_databases() throws TException - { - 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(); - oprot_.getTransport().flush(); - } - - public List recv_get_all_databases() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_all_databases_result result = new get_all_databases_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); - } - - public Type get_type(String name) throws MetaException, NoSuchObjectException, TException - { - send_get_type(name); - return recv_get_type(); - } - - public void send_get_type(String name) throws TException - { - oprot_.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, seqid_)); - get_type_args args = new get_type_args(); - args.name = name; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Type recv_get_type() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_type_result result = new get_type_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); - } - - public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, TException - { - send_create_type(type); - return recv_create_type(); - } - - public void send_create_type(Type type) throws TException - { - oprot_.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, seqid_)); - create_type_args args = new create_type_args(); - args.type = type; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public boolean recv_create_type() throws AlreadyExistsException, InvalidObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - create_type_result result = new create_type_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); - } - - public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException - { - send_drop_type(type); - return recv_drop_type(); - } - - public void send_drop_type(String type) throws TException - { - oprot_.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, seqid_)); - drop_type_args args = new drop_type_args(); - args.type = type; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public boolean recv_drop_type() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_type_result result = new drop_type_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); - } - - public Map get_type_all(String name) throws MetaException, TException - { - send_get_type_all(name); - return recv_get_type_all(); - } - - public void send_get_type_all(String name) throws TException - { - oprot_.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, seqid_)); - get_type_all_args args = new get_type_all_args(); - args.name = name; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Map recv_get_type_all() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_type_all_result result = new get_type_all_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); - } - - public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException - { - send_get_fields(db_name, table_name); - return recv_get_fields(); - } - - public void send_get_fields(String db_name, String table_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_fields() throws MetaException, UnknownTableException, UnknownDBException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_fields_result result = new get_fields_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); - } - - public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException - { - send_get_schema(db_name, table_name); - return recv_get_schema(); - } - - public void send_get_schema(String db_name, String table_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_schema() throws MetaException, UnknownTableException, UnknownDBException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_schema_result result = new get_schema_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); - } - - public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException - { - send_create_table(tbl); - recv_create_table(); - } - - public void send_create_table(Table tbl) throws TException - { - oprot_.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, seqid_)); - create_table_args args = new create_table_args(); - args.tbl = tbl; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_create_table() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - create_table_result result = new create_table_result(); - result.read(iprot_); - iprot_.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 void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException - { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); - } - - public void send_drop_table(String dbname, String name, boolean deleteData) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_drop_table() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_table_result result = new drop_table_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public List get_tables(String db_name, String pattern) throws MetaException, TException - { - send_get_tables(db_name, pattern); - return recv_get_tables(); - } - - public void send_get_tables(String db_name, String pattern) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_tables() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_tables_result result = new get_tables_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); - } - - public List get_all_tables(String db_name) throws MetaException, TException - { - send_get_all_tables(db_name); - return recv_get_all_tables(); - } - - public void send_get_all_tables(String db_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_all_tables() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_all_tables_result result = new get_all_tables_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); - } - - public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException - { - send_get_table(dbname, tbl_name); - return recv_get_table(); - } - - public void send_get_table(String dbname, String tbl_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Table recv_get_table() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_table_result result = new get_table_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); - } - - public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException - { - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); - } - - public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_alter_table() throws InvalidOperationException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - alter_table_result result = new alter_table_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - send_add_partition(new_part); - return recv_add_partition(); - } - - public void send_add_partition(Partition new_part) throws TException - { - oprot_.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, seqid_)); - add_partition_args args = new add_partition_args(); - args.new_part = new_part; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Partition recv_add_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - add_partition_result result = new add_partition_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); - } - - public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - send_append_partition(db_name, tbl_name, part_vals); - return recv_append_partition(); - } - - 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_)); - append_partition_args args = new append_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Partition recv_append_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - append_partition_result result = new append_partition_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); - } - - public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - send_append_partition_by_name(db_name, tbl_name, part_name); - return recv_append_partition_by_name(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Partition recv_append_partition_by_name() throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - append_partition_by_name_result result = new append_partition_by_name_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); - } - - public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, TException - { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public boolean recv_drop_partition() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_partition_result result = new drop_partition_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); - } - - public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException - { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public boolean recv_drop_partition_by_name() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_partition_by_name_result result = new drop_partition_by_name_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); - } - - public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, TException - { - send_get_partition(db_name, tbl_name, part_vals); - return recv_get_partition(); - } - - 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_)); - get_partition_args args = new get_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Partition recv_get_partition() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partition_result result = new get_partition_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); - } - - public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException - { - send_get_partition_by_name(db_name, tbl_name, part_name); - return recv_get_partition_by_name(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Partition recv_get_partition_by_name() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partition_by_name_result result = new get_partition_by_name_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); - } - - public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException - { - send_get_partitions(db_name, tbl_name, max_parts); - return recv_get_partitions(); - } - - 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_)); - get_partitions_args args = new get_partitions_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_parts = max_parts; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_partitions() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partitions_result result = new get_partitions_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); - } - - public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException - { - send_get_partition_names(db_name, tbl_name, max_parts); - return recv_get_partition_names(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_partition_names() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partition_names_result result = new get_partition_names_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); - } - - public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException - { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - return recv_get_partitions_ps(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_partitions_ps() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partitions_ps_result result = new get_partitions_ps_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); - } - - public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException - { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - return recv_get_partition_names_ps(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_partition_names_ps() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partition_names_ps_result result = new get_partition_names_ps_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); - } - - public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException - { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - return recv_get_partitions_by_filter(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_partitions_by_filter() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); - } - - public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, TException - { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); - } - - 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_)); - alter_partition_args args = new alter_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.new_part = new_part; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_alter_partition() throws InvalidOperationException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - alter_partition_result result = new alter_partition_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, TException - { - send_get_config_value(name, defaultValue); - return recv_get_config_value(); - } - - public void send_get_config_value(String name, String defaultValue) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public String recv_get_config_value() throws ConfigValSecurityException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_config_value_result result = new get_config_value_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); - } - - public List partition_name_to_vals(String part_name) throws MetaException, TException - { - send_partition_name_to_vals(part_name); - return recv_partition_name_to_vals(); - } - - public void send_partition_name_to_vals(String part_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_partition_name_to_vals() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - partition_name_to_vals_result result = new partition_name_to_vals_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); - } - - public Map partition_name_to_spec(String part_name) throws MetaException, TException - { - send_partition_name_to_spec(part_name); - return recv_partition_name_to_spec(); - } - - public void send_partition_name_to_spec(String part_name) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Map recv_partition_name_to_spec() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - partition_name_to_spec_result result = new partition_name_to_spec_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); - } - - public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - send_add_index(new_index, index_table); - return recv_add_index(); - } - - public void send_add_index(Index new_index, Table index_table) throws TException - { - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Index recv_add_index() throws InvalidObjectException, AlreadyExistsException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - add_index_result result = new add_index_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); - } - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, TException - { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); - } - - public void send_alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws TException - { - oprot_.writeMessageBegin(new TMessage("alter_index", TMessageType.CALL, seqid_)); - alter_index_args args = new alter_index_args(); - args.dbname = dbname; - args.base_tbl_name = base_tbl_name; - args.idx_name = idx_name; - args.new_idx = new_idx; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_alter_index() throws InvalidOperationException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - alter_index_result result = new alter_index_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException - { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public boolean recv_drop_index_by_name() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - drop_index_by_name_result result = new drop_index_by_name_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); - } - - public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, TException - { - send_get_index_by_name(db_name, tbl_name, index_name); - return recv_get_index_by_name(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public Index recv_get_index_by_name() throws MetaException, NoSuchObjectException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_index_by_name_result result = new get_index_by_name_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); - } - - public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, TException - { - send_get_indexes(db_name, tbl_name, max_indexes); - return recv_get_indexes(); - } - - 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_)); - get_indexes_args args = new get_indexes_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_indexes = max_indexes; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_indexes() throws NoSuchObjectException, MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_indexes_result result = new get_indexes_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); - } - - public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException - { - send_get_index_names(db_name, tbl_name, max_indexes); - return recv_get_index_names(); - } - - 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_)); - 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.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_get_index_names() throws MetaException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - get_index_names_result result = new get_index_names_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); - } - - } - 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("alter_index", new alter_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(); - 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; - } - 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(); - 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; - } - 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(); - 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; - } - 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(); - 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; - } - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_all_databases implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_all_databases_args args = new get_all_databases_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_all_databases_result result = new get_all_databases_result(); - try { - result.success = iface_.get_all_databases(); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_databases", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_type_args args = new get_type_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_type_result result = new get_type_result(); - try { - result.success = iface_.get_type(args.name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type"); - oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class create_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_type_args args = new create_type_args(); - args.read(iprot); - iprot.readMessageEnd(); - create_type_result result = new create_type_result(); - try { - result.success = iface_.create_type(args.type); - result.__isset.success = true; - } 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_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_type"); - oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("create_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class drop_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_type_args args = new drop_type_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_type_result result = new drop_type_result(); - try { - result.success = iface_.drop_type(args.type); - result.__isset.success = true; - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_type"); - oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_type_all implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_type_all_args args = new get_type_all_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_type_all_result result = new get_type_all_result(); - try { - result.success = iface_.get_type_all(args.name); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_type_all", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type_all"); - oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_fields implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_fields_args args = new get_fields_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_fields_result result = new get_fields_result(); - try { - result.success = iface_.get_fields(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_fields", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_fields"); - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_schema implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_schema_args args = new get_schema_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_schema_result result = new get_schema_result(); - try { - result.success = iface_.get_schema(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_schema", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class create_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_table_args args = new create_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - create_table_result result = new create_table_result(); - try { - iface_.create_table(args.tbl); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class drop_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_table_args args = new drop_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_table_result result = new drop_table_result(); - try { - iface_.drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_tables_args args = new get_tables_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_tables_result result = new get_tables_result(); - try { - result.success = iface_.get_tables(args.db_name, args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_all_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_all_tables_args args = new get_all_tables_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_all_tables_result result = new get_all_tables_result(); - try { - result.success = iface_.get_all_tables(args.db_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_table_args args = new get_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_table_result result = new get_table_result(); - try { - result.success = iface_.get_table(args.dbname, args.tbl_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class alter_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_table_args args = new alter_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_table_result result = new alter_table_result(); - try { - iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class add_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_partition_args args = new add_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - add_partition_result result = new add_partition_result(); - try { - result.success = iface_.add_partition(args.new_part); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class append_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - append_partition_args args = new append_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - append_partition_result result = new append_partition_result(); - try { - result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class append_partition_by_name implements ProcessFunction { - 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); - iprot.readMessageEnd(); - append_partition_by_name_result result = new append_partition_by_name_result(); - try { - result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class drop_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_partition_args args = new drop_partition_args(); - args.read(iprot); - 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; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class drop_partition_by_name implements ProcessFunction { - 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); - 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; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_args args = new get_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_result result = new get_partition_result(); - try { - result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partition_by_name implements ProcessFunction { - 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); - iprot.readMessageEnd(); - get_partition_by_name_result result = new get_partition_by_name_result(); - try { - result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partitions implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_args args = new get_partitions_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partitions_result result = new get_partitions_result(); - try { - result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partition_names implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_names_args args = new get_partition_names_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_names_result result = new get_partition_names_result(); - try { - result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partitions_ps implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_ps_args args = new get_partitions_ps_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partitions_ps_result result = new get_partitions_ps_result(); - try { - result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partition_names_ps implements ProcessFunction { - 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); - iprot.readMessageEnd(); - get_partition_names_ps_result result = new get_partition_names_ps_result(); - try { - result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_partitions_by_filter implements ProcessFunction { - 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); - iprot.readMessageEnd(); - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - try { - result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_by_filter", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class alter_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_partition_args args = new alter_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_partition_result result = new alter_partition_result(); - try { - iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_config_value implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_config_value_args args = new get_config_value_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_config_value_result result = new get_config_value_result(); - try { - result.success = iface_.get_config_value(args.name, args.defaultValue); - } catch (ConfigValSecurityException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_config_value", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class partition_name_to_vals implements ProcessFunction { - 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); - iprot.readMessageEnd(); - partition_name_to_vals_result result = new partition_name_to_vals_result(); - try { - result.success = iface_.partition_name_to_vals(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_vals", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class partition_name_to_spec implements ProcessFunction { - 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); - iprot.readMessageEnd(); - partition_name_to_spec_result result = new partition_name_to_spec_result(); - try { - result.success = iface_.partition_name_to_spec(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_spec", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class add_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_index_args args = new add_index_args(); - args.read(iprot); - iprot.readMessageEnd(); - add_index_result result = new add_index_result(); - try { - result.success = iface_.add_index(args.new_index, args.index_table); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class alter_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_index_args args = new alter_index_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_index_result result = new alter_index_result(); - try { - iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class drop_index_by_name implements ProcessFunction { - 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); - 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; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_index_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_index_by_name implements ProcessFunction { - 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); - iprot.readMessageEnd(); - get_index_by_name_result result = new get_index_by_name_result(); - try { - result.success = iface_.get_index_by_name(args.db_name, args.tbl_name, args.index_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_index_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_by_name"); - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_indexes implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_indexes_args args = new get_indexes_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_indexes_result result = new get_indexes_result(); - try { - result.success = iface_.get_indexes(args.db_name, args.tbl_name, args.max_indexes); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_indexes", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_indexes"); - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class get_index_names implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_index_names_args args = new get_index_names_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_index_names_result result = new get_index_names_result(); - try { - result.success = iface_.get_index_names(args.db_name, args.tbl_name, args.max_indexes); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_index_names", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_names"); - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); - } - - public create_database_args() { - } - - public create_database_args( - Database database) - { - this(); - this.database = database; - } - - /** - * Performs a deep copy on other. - */ - public create_database_args(create_database_args other) { - if (other.isSetDatabase()) { - this.database = new Database(other.database); - } - } - - @Override - public create_database_args clone() { - return new create_database_args(this); - } - - public Database getDatabase() { - return this.database; - } - - public void setDatabase(Database database) { - this.database = database; - } - - public void unsetDatabase() { - this.database = null; - } - - // 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) { - case DATABASE: - if (value == null) { - unsetDatabase(); - } else { - setDatabase((Database)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DATABASE: - return getDatabase(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DATABASE: - return isSetDatabase(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_database_args) - return this.equals((create_database_args)that); - return false; - } - - public boolean equals(create_database_args that) { - if (that == null) - return false; - - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) - return false; - if (!this.database.equals(that.database)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DATABASE: - if (field.type == TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_database_args("); - boolean first = true; - - sb.append("database:"); - if (this.database == null) { - sb.append("null"); - } else { - sb.append(this.database); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); - } - - public create_database_result() { - } - - public create_database_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public create_database_result(create_database_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public create_database_result clone() { - return new create_database_result(this); - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_database_result) - return this.equals((create_database_result)that); - return false; - } - - public boolean equals(create_database_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_database_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); - } - - public get_database_args() { - } - - public get_database_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_database_args(get_database_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - @Override - public get_database_args clone() { - return new get_database_args(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_database_args) - return this.equals((get_database_args)that); - return false; - } - - public boolean equals(get_database_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_database_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); - } - - public get_database_result() { - } - - public get_database_result( - Database success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_database_result(get_database_result other) { - if (other.isSetSuccess()) { - this.success = new Database(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_database_result clone() { - return new get_database_result(this); - } - - public Database getSuccess() { - return this.success; - } - - public void setSuccess(Database success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Database)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_database_result) - return this.equals((get_database_result)that); - return false; - } - - public boolean equals(get_database_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Database(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_database_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); - } - - public drop_database_args() { - } - - public drop_database_args( - String name, - boolean deleteData) - { - this(); - this.name = name; - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - /** - * Performs a deep copy on other. - */ - public drop_database_args(drop_database_args other) { - if (other.isSetName()) { - this.name = other.name; - } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; - } - - @Override - public drop_database_args clone() { - return new drop_database_args(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - public void unsetDeleteData() { - this.__isset.deleteData = false; - } - - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETEDATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case DELETEDATA: - return new Boolean(isDeleteData()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case DELETEDATA: - return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_database_args) - return this.equals((drop_database_args)that); - return false; - } - - public boolean equals(drop_database_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_database_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - 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))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); - } - - public drop_database_result() { - } - - public drop_database_result( - NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_database_result(drop_database_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidOperationException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public drop_database_result clone() { - return new drop_database_result(this); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public InvalidOperationException getO2() { - return this.o2; - } - - public void setO2(InvalidOperationException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidOperationException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_database_result) - return this.equals((drop_database_result)that); - return false; - } - - public boolean equals(drop_database_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_database_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); - } - - public get_databases_args() { - } - - public get_databases_args( - String pattern) - { - this(); - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - @Override - public get_databases_args clone() { - return new get_databases_args(this); - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - // 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) { - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case PATTERN: - return getPattern(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case PATTERN: - return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_databases_args) - return this.equals((get_databases_args)that); - return false; - } - - public boolean equals(get_databases_args that) { - if (that == null) - return false; - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case PATTERN: - if (field.type == TType.STRING) { - this.pattern = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_databases_args("); - boolean first = true; - - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); - } - - public get_databases_result() { - } - - public get_databases_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_databases_result(get_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_databases_result clone() { - return new get_databases_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_databases_result) - return this.equals((get_databases_result)that); - return false; - } - - public boolean equals(get_databases_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list58 = iprot.readListBegin(); - this.success = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - String _elem60; - _elem60 = iprot.readString(); - this.success.add(_elem60); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter61 : this.success) { - oprot.writeString(_iter61); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_databases_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args"); - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); - } - - public get_all_databases_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_all_databases_args(get_all_databases_args other) { - } - - @Override - public get_all_databases_args clone() { - return new get_all_databases_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_databases_args) - return this.equals((get_all_databases_args)that); - return false; - } - - public boolean equals(get_all_databases_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); - } - - public get_all_databases_result() { - } - - public get_all_databases_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_all_databases_result(get_all_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_all_databases_result clone() { - return new get_all_databases_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_databases_result) - return this.equals((get_all_databases_result)that); - return false; - } - - public boolean equals(get_all_databases_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list62 = iprot.readListBegin(); - this.success = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) - { - String _elem64; - _elem64 = iprot.readString(); - this.success.add(_elem64); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter65 : this.success) { - oprot.writeString(_iter65); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); - } - - public get_type_args() { - } - - public get_type_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - @Override - public get_type_args clone() { - return new get_type_args(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_args) - return this.equals((get_type_args)that); - return false; - } - - public boolean equals(get_type_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_type_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); - } - - public get_type_result() { - } - - public get_type_result( - Type success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_type_result(get_type_result other) { - if (other.isSetSuccess()) { - this.success = new Type(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_type_result clone() { - return new get_type_result(this); - } - - public Type getSuccess() { - return this.success; - } - - public void setSuccess(Type success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Type)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_result) - return this.equals((get_type_result)that); - return false; - } - - public boolean equals(get_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Type(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_type_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); - } - - public create_type_args() { - } - - public create_type_args( - Type type) - { - this(); - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public create_type_args(create_type_args other) { - if (other.isSetType()) { - this.type = new Type(other.type); - } - } - - @Override - public create_type_args clone() { - return new create_type_args(this); - } - - public Type getType() { - return this.type; - } - - public void setType(Type type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - // 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) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((Type)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TYPE: - return getType(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TYPE: - return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_type_args) - return this.equals((create_type_args)that); - return false; - } - - public boolean equals(create_type_args that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TYPE: - if (field.type == TType.STRUCT) { - this.type = new Type(); - this.type.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - this.type.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_type_args("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); - } - - public create_type_result() { - } - - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public create_type_result(create_type_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public create_type_result clone() { - return new create_type_result(this); - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; - } - - public void unsetSuccess() { - this.__isset.success = false; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_type_result) - return this.equals((create_type_result)that); - return false; - } - - public boolean equals(create_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_type_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); - } - - public drop_type_args() { - } - - public drop_type_args( - String type) - { - this(); - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; - } - } - - @Override - public drop_type_args clone() { - return new drop_type_args(this); - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - // 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) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TYPE: - return getType(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TYPE: - return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_type_args) - return this.equals((drop_type_args)that); - return false; - } - - public boolean equals(drop_type_args that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TYPE: - if (field.type == TType.STRING) { - this.type = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_type_args("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); - } - - public drop_type_result() { - } - - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_type_result(drop_type_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public drop_type_result clone() { - return new drop_type_result(this); - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; - } - - public void unsetSuccess() { - this.__isset.success = false; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_type_result) - return this.equals((drop_type_result)that); - return false; - } - - public boolean equals(drop_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_type_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); - } - - public get_type_all_args() { - } - - public get_type_all_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_type_all_args(get_type_all_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - @Override - public get_type_all_args clone() { - return new get_type_all_args(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_all_args) - return this.equals((get_type_all_args)that); - return false; - } - - public boolean equals(get_type_all_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(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, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); - } - - public get_type_all_result() { - } - - public get_type_all_result( - Map success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_type_all_result(get_type_all_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { - - String other_element_key = other_element.getKey(); - Type other_element_value = other_element.getValue(); - - String __this__success_copy_key = other_element_key; - - Type __this__success_copy_value = new Type(other_element_value); - - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_type_all_result clone() { - return new get_type_all_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, Type val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { - return this.success; - } - - public void setSuccess(Map success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_all_result) - return this.equals((get_type_all_result)that); - return false; - } - - public boolean equals(get_type_all_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.MAP) { - { - TMap _map66 = iprot.readMapBegin(); - this.success = new HashMap(2*_map66.size); - for (int _i67 = 0; _i67 < _map66.size; ++_i67) - { - String _key68; - Type _val69; - _key68 = iprot.readString(); - _val69 = new Type(); - _val69.read(iprot); - this.success.put(_key68, _val69); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter70 : this.success.entrySet()) { - oprot.writeString(_iter70.getKey()); - _iter70.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); - } - - public get_fields_args() { - } - - public get_fields_args( - String db_name, - String table_name) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_args(get_fields_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - } - - @Override - public get_fields_args clone() { - return new get_fields_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_args) - return this.equals((get_fields_args)that); - return false; - } - - public boolean equals(get_fields_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TABLE_NAME: - if (field.type == TType.STRING) { - this.table_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_fields_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); - } - - public get_fields_result() { - } - - public get_fields_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_result(get_fields_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - @Override - public get_fields_result clone() { - return new get_fields_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_result) - return this.equals((get_fields_result)that); - return false; - } - - public boolean equals(get_fields_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list71 = iprot.readListBegin(); - this.success = new ArrayList(_list71.size); - for (int _i72 = 0; _i72 < _list71.size; ++_i72) - { - FieldSchema _elem73; - _elem73 = new FieldSchema(); - _elem73.read(iprot); - this.success.add(_elem73); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter74 : this.success) { - _iter74.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_fields_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_schema_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); - - private String db_name; - public static final int DB_NAME = 1; - private String table_name; - public static final int TABLE_NAME = 2; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); - } - - public get_schema_args() { - } - - public get_schema_args( - String db_name, - String table_name) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_args(get_schema_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - } - - @Override - public get_schema_args clone() { - return new get_schema_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_args) - return this.equals((get_schema_args)that); - return false; - } - - public boolean equals(get_schema_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TABLE_NAME: - if (field.type == TType.STRING) { - this.table_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_schema_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); - } - - public get_schema_result() { - } - - public get_schema_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_result(get_schema_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - @Override - public get_schema_result clone() { - return new get_schema_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_result) - return this.equals((get_schema_result)that); - return false; - } - - public boolean equals(get_schema_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list75 = iprot.readListBegin(); - this.success = new ArrayList(_list75.size); - for (int _i76 = 0; _i76 < _list75.size; ++_i76) - { - FieldSchema _elem77; - _elem77 = new FieldSchema(); - _elem77.read(iprot); - this.success.add(_elem77); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter78 : this.success) { - _iter78.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_schema_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); - } - - public create_table_args() { - } - - public create_table_args( - Table tbl) - { - this(); - this.tbl = tbl; - } - - /** - * Performs a deep copy on other. - */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); - } - } - - @Override - public create_table_args clone() { - return new create_table_args(this); - } - - public Table getTbl() { - return this.tbl; - } - - public void setTbl(Table tbl) { - this.tbl = tbl; - } - - public void unsetTbl() { - this.tbl = null; - } - - // 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) { - case TBL: - if (value == null) { - unsetTbl(); - } else { - setTbl((Table)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TBL: - return getTbl(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TBL: - return isSetTbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_args) - return this.equals((create_table_args)that); - return false; - } - - public boolean equals(create_table_args that) { - if (that == null) - return false; - - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) - return false; - if (!this.tbl.equals(that.tbl)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TBL: - if (field.type == TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_table_args("); - boolean first = true; - - sb.append("tbl:"); - if (this.tbl == null) { - sb.append("null"); - } else { - sb.append(this.tbl); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); - } - - public create_table_result() { - } - - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public create_table_result(create_table_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); - } - } - - @Override - public create_table_result clone() { - return new create_table_result(this); - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public NoSuchObjectException getO4() { - return this.o4; - } - - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - // 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) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_result) - return this.equals((create_table_result)that); - return false; - } - - public boolean equals(create_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O4: - if (field.type == TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("create_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); - } - - public drop_table_args() { - } - - public drop_table_args( - String dbname, - String name, - boolean deleteData) - { - this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - /** - * Performs a deep copy on other. - */ - public drop_table_args(drop_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetName()) { - this.name = other.name; - } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; - } - - @Override - public drop_table_args clone() { - return new drop_table_args(this); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - // Returns true if field dbname is set (has been asigned a value) and false otherwise - public boolean isSetDbname() { - return this.dbname != null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - public void unsetDeleteData() { - this.__isset.deleteData = false; - } - - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETEDATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DBNAME: - return getDbname(); - - case NAME: - return getName(); - - case DELETEDATA: - return new Boolean(isDeleteData()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETEDATA: - return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_args) - return this.equals((drop_table_args)that); - return false; - } - - public boolean equals(drop_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); - } - - public drop_table_result() { - } - - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) - { - this(); - this.o1 = o1; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_table_result(drop_table_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public drop_table_result clone() { - return new drop_table_result(this); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_result) - return this.equals((drop_table_result)that); - return false; - } - - public boolean equals(drop_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); - } - - public get_tables_args() { - } - - public get_tables_args( - String db_name, - String pattern) - { - this(); - this.db_name = db_name; - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_args(get_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - @Override - public get_tables_args clone() { - return new get_tables_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case PATTERN: - return getPattern(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case PATTERN: - return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_args) - return this.equals((get_tables_args)that); - return false; - } - - public boolean equals(get_tables_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PATTERN: - if (field.type == TType.STRING) { - this.pattern = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_tables_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); - } - - public get_tables_result() { - } - - public get_tables_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_result(get_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_tables_result clone() { - return new get_tables_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_result) - return this.equals((get_tables_result)that); - return false; - } - - public boolean equals(get_tables_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list79 = iprot.readListBegin(); - this.success = new ArrayList(_list79.size); - for (int _i80 = 0; _i80 < _list79.size; ++_i80) - { - String _elem81; - _elem81 = iprot.readString(); - this.success.add(_elem81); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter82 : this.success) { - oprot.writeString(_iter82); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_tables_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); - } - - public get_all_tables_args() { - } - - public get_all_tables_args( - String db_name) - { - this(); - this.db_name = db_name; - } - - /** - * Performs a deep copy on other. - */ - public get_all_tables_args(get_all_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - } - - @Override - public get_all_tables_args clone() { - return new get_all_tables_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_tables_args) - return this.equals((get_all_tables_args)that); - return false; - } - - public boolean equals(get_all_tables_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); - } - - public get_all_tables_result() { - } - - public get_all_tables_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_all_tables_result(get_all_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_all_tables_result clone() { - return new get_all_tables_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_tables_result) - return this.equals((get_all_tables_result)that); - return false; - } - - public boolean equals(get_all_tables_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list83 = iprot.readListBegin(); - this.success = new ArrayList(_list83.size); - for (int _i84 = 0; _i84 < _list83.size; ++_i84) - { - String _elem85; - _elem85 = iprot.readString(); - this.success.add(_elem85); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter86 : this.success) { - oprot.writeString(_iter86); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); - } - - public get_table_args() { - } - - public get_table_args( - String dbname, - String tbl_name) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public get_table_args(get_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - } - - @Override - public get_table_args clone() { - return new get_table_args(this); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - // Returns true if field dbname is set (has been asigned a value) and false otherwise - public boolean isSetDbname() { - return this.dbname != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_args) - return this.equals((get_table_args)that); - return false; - } - - public boolean equals(get_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); - } - - public get_table_result() { - } - - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_table_result(get_table_result other) { - if (other.isSetSuccess()) { - this.success = new Table(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_table_result clone() { - return new get_table_result(this); - } - - public Table getSuccess() { - return this.success; - } - - public void setSuccess(Table success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Table)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_result) - return this.equals((get_table_result)that); - return false; - } - - public boolean equals(get_table_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Table(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_table_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - 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))); - put(NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); - } - - public alter_table_args() { - } - - public alter_table_args( - String dbname, - String tbl_name, - Table new_tbl) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_args(alter_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); - } - } - - @Override - public alter_table_args clone() { - return new alter_table_args(this); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - // Returns true if field dbname is set (has been asigned a value) and false otherwise - public boolean isSetDbname() { - return this.dbname != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public Table getNew_tbl() { - return this.new_tbl; - } - - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; - } - - public void unsetNew_tbl() { - this.new_tbl = null; - } - - // 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) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_TBL: - if (value == null) { - unsetNew_tbl(); - } else { - setNew_tbl((Table)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_TBL: - return getNew_tbl(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_args) - return this.equals((alter_table_args)that); - return false; - } - - public boolean equals(alter_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_tbl = true && this.isSetNew_tbl(); - boolean that_present_new_tbl = true && that.isSetNew_tbl(); - if (this_present_new_tbl || that_present_new_tbl) { - if (!(this_present_new_tbl && that_present_new_tbl)) - return false; - if (!this.new_tbl.equals(that.new_tbl)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NEW_TBL: - if (field.type == TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { - sb.append("null"); - } else { - sb.append(this.new_tbl); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); - } - - public alter_table_result() { - } - - public alter_table_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_result(alter_table_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public alter_table_result clone() { - return new alter_table_result(this); - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_result) - return this.equals((alter_table_result)that); - return false; - } - - public boolean equals(alter_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); - } - - public add_partition_args() { - } - - public add_partition_args( - Partition new_part) - { - this(); - this.new_part = new_part; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_args(add_partition_args other) { - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - } - - @Override - public add_partition_args clone() { - return new add_partition_args(this); - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - // 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) { - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NEW_PART: - return getNew_part(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NEW_PART: - return isSetNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_args) - return this.equals((add_partition_args)that); - return false; - } - - public boolean equals(add_partition_args that) { - if (that == null) - return false; - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NEW_PART: - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("add_partition_args("); - boolean first = true; - - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); - } - - public add_partition_result() { - } - - public add_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_result(add_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public add_partition_result clone() { - return new add_partition_result(this); - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_result) - return this.equals((add_partition_result)that); - return false; - } - - public boolean equals(add_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("add_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); - } - - public append_partition_args() { - } - - public append_partition_args( - String db_name, - String tbl_name, - List part_vals) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_args(append_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - } - - @Override - public append_partition_args clone() { - return new append_partition_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_args) - return this.equals((append_partition_args)that); - return false; - } - - public boolean equals(append_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list87 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list87.size); - for (int _i88 = 0; _i88 < _list87.size; ++_i88) - { - String _elem89; - _elem89 = iprot.readString(); - this.part_vals.add(_elem89); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter90 : this.part_vals) { - oprot.writeString(_iter90); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("append_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); - } - - public append_partition_result() { - } - - public append_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_result(append_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public append_partition_result clone() { - return new append_partition_result(this); - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_result) - return this.equals((append_partition_result)that); - return false; - } - - public boolean equals(append_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("append_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); - } - - public append_partition_by_name_args() { - } - - public append_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_args(append_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - @Override - public append_partition_by_name_args clone() { - return new append_partition_by_name_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_args) - return this.equals((append_partition_by_name_args)that); - return false; - } - - public boolean equals(append_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); - } - - public append_partition_by_name_result() { - } - - public append_partition_by_name_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_result(append_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public append_partition_by_name_result clone() { - return new append_partition_by_name_result(this); - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_result) - return this.equals((append_partition_by_name_result)that); - return false; - } - - public boolean equals(append_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); - } - - public drop_partition_args() { - } - - public drop_partition_args( - String db_name, - String tbl_name, - List part_vals, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_args(drop_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; - } - - @Override - public drop_partition_args clone() { - return new drop_partition_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - // 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 boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - public void unsetDeleteData() { - this.__isset.deleteData = false; - } - - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case DELETEDATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case DELETEDATA: - return new Boolean(isDeleteData()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETEDATA: - return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_args) - return this.equals((drop_partition_args)that); - return false; - } - - public boolean equals(drop_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list91 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list91.size); - for (int _i92 = 0; _i92 < _list91.size; ++_i92) - { - String _elem93; - _elem93 = iprot.readString(); - this.part_vals.add(_elem93); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter94 : this.part_vals) { - oprot.writeString(_iter94); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); - } - - public drop_partition_result() { - } - - public drop_partition_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_result(drop_partition_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public drop_partition_result clone() { - return new drop_partition_result(this); - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; - } - - public void unsetSuccess() { - this.__isset.success = false; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_result) - return this.equals((drop_partition_result)that); - return false; - } - - public boolean equals(drop_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); - } - - public drop_partition_by_name_args() { - } - - public drop_partition_by_name_args( - String db_name, - String tbl_name, - String part_name, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_args(drop_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; - } - - @Override - public drop_partition_by_name_args clone() { - return new drop_partition_by_name_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - // 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 boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - public void unsetDeleteData() { - this.__isset.deleteData = false; - } - - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case DELETEDATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case DELETEDATA: - return new Boolean(isDeleteData()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case DELETEDATA: - return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_args) - return this.equals((drop_partition_by_name_args)that); - return false; - } - - public boolean equals(drop_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); - } - - public drop_partition_by_name_result() { - } - - public drop_partition_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public drop_partition_by_name_result clone() { - return new drop_partition_by_name_result(this); - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; - } - - public void unsetSuccess() { - this.__isset.success = false; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_result) - return this.equals((drop_partition_by_name_result)that); - return false; - } - - public boolean equals(drop_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); - } - - public get_partition_args() { - } - - public get_partition_args( - String db_name, - String tbl_name, - List part_vals) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_args(get_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - } - - @Override - public get_partition_args clone() { - return new get_partition_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_args) - return this.equals((get_partition_args)that); - return false; - } - - public boolean equals(get_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list95 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list95.size); - for (int _i96 = 0; _i96 < _list95.size; ++_i96) - { - String _elem97; - _elem97 = iprot.readString(); - this.part_vals.add(_elem97); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter98 : this.part_vals) { - oprot.writeString(_iter98); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); - } - - public get_partition_result() { - } - - public get_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_result(get_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_partition_result clone() { - return new get_partition_result(this); - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_result) - return this.equals((get_partition_result)that); - return false; - } - - public boolean equals(get_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String part_name; - public static final int PART_NAME = 3; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); - } - - public get_partition_by_name_args() { - } - - public get_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_by_name_args(get_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - @Override - public get_partition_by_name_args clone() { - return new get_partition_by_name_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_by_name_args) - return this.equals((get_partition_by_name_args)that); - return false; - } - - public boolean equals(get_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); - } - - public get_partition_by_name_result() { - } - - public get_partition_by_name_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_by_name_result(get_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_partition_by_name_result clone() { - return new get_partition_by_name_result(this); - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_by_name_result) - return this.equals((get_partition_by_name_result)that); - return false; - } - - public boolean equals(get_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); - } - - public get_partitions_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_args( - String db_name, - String tbl_name, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_args(get_partitions_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partitions_args clone() { - return new get_partitions_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return 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; - } - - public void unsetMax_parts() { - this.__isset.max_parts = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return new Short(getMax_parts()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_args) - return this.equals((get_partitions_args)that); - return false; - } - - public boolean equals(get_partitions_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); - } - - public get_partitions_result() { - } - - public get_partitions_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_result(get_partitions_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_partitions_result clone() { - return new get_partitions_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_result) - return this.equals((get_partitions_result)that); - return false; - } - - public boolean equals(get_partitions_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list99 = iprot.readListBegin(); - this.success = new ArrayList(_list99.size); - for (int _i100 = 0; _i100 < _list99.size; ++_i100) - { - Partition _elem101; - _elem101 = new Partition(); - _elem101.read(iprot); - this.success.add(_elem101); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter102 : this.success) { - _iter102.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); - - private String db_name; - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); - } - - public get_partition_names_args() { - this.max_parts = (short)-1; - - } - - public get_partition_names_args( - String db_name, - String tbl_name, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_args(get_partition_names_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partition_names_args clone() { - return new get_partition_names_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return 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; - } - - public void unsetMax_parts() { - this.__isset.max_parts = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return new Short(getMax_parts()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_args) - return this.equals((get_partition_names_args)that); - return false; - } - - public boolean equals(get_partition_names_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); - } - - public get_partition_names_result() { - } - - public get_partition_names_result( - List success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_result(get_partition_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_partition_names_result clone() { - return new get_partition_names_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_result) - return this.equals((get_partition_names_result)that); - return false; - } - - public boolean equals(get_partition_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list103 = iprot.readListBegin(); - this.success = new ArrayList(_list103.size); - for (int _i104 = 0; _i104 < _list103.size; ++_i104) - { - String _elem105; - _elem105 = iprot.readString(); - this.success.add(_elem105); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter106 : this.success) { - oprot.writeString(_iter106); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(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, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); - } - - public get_partitions_ps_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_args(get_partitions_ps_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partitions_ps_args clone() { - return new get_partitions_ps_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - // 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 short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - public void unsetMax_parts() { - this.__isset.max_parts = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return new Short(getMax_parts()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_args) - return this.equals((get_partitions_ps_args)that); - return false; - } - - public boolean equals(get_partitions_ps_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list107 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list107.size); - for (int _i108 = 0; _i108 < _list107.size; ++_i108) - { - String _elem109; - _elem109 = iprot.readString(); - this.part_vals.add(_elem109); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter110 : this.part_vals) { - oprot.writeString(_iter110); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class get_partitions_ps_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - - private List success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); - } - - public get_partitions_ps_result() { - } - - public get_partitions_ps_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_result(get_partitions_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_partitions_ps_result clone() { - return new get_partitions_ps_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_result) - return this.equals((get_partitions_ps_result)that); - return false; - } - - public boolean equals(get_partitions_ps_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list111 = iprot.readListBegin(); - this.success = new ArrayList(_list111.size); - for (int _i112 = 0; _i112 < _list111.size; ++_i112) - { - Partition _elem113; - _elem113 = new Partition(); - _elem113.read(iprot); - this.success.add(_elem113); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter114 : this.success) { - _iter114.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(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, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); - } - - public get_partition_names_ps_args() { - this.max_parts = (short)-1; - - } - - public get_partition_names_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_ps_args(get_partition_names_ps_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partition_names_ps_args clone() { - return new get_partition_names_ps_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - // 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 short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - public void unsetMax_parts() { - this.__isset.max_parts = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return new Short(getMax_parts()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_ps_args) - return this.equals((get_partition_names_ps_args)that); - return false; - } - - public boolean equals(get_partition_names_ps_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list115 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list115.size); - for (int _i116 = 0; _i116 < _list115.size; ++_i116) - { - String _elem117; - _elem117 = iprot.readString(); - this.part_vals.add(_elem117); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter118 : this.part_vals) { - oprot.writeString(_iter118); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); - } - - public get_partition_names_ps_result() { - } - - public get_partition_names_ps_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_ps_result(get_partition_names_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_partition_names_ps_result clone() { - return new get_partition_names_ps_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_ps_result) - return this.equals((get_partition_names_ps_result)that); - return false; - } - - public boolean equals(get_partition_names_ps_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list119 = iprot.readListBegin(); - this.success = new ArrayList(_list119.size); - for (int _i120 = 0; _i120 < _list119.size; ++_i120) - { - String _elem121; - _elem121 = iprot.readString(); - this.success.add(_elem121); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter122 : this.success) { - oprot.writeString(_iter122); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); - } - - public get_partitions_by_filter_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_by_filter_args( - String db_name, - String tbl_name, - String filter, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - this.__isset.max_parts = true; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partitions_by_filter_args clone() { - return new get_partitions_by_filter_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = null; - } - - // Returns true if field filter is set (has been asigned a value) and false otherwise - public boolean isSetFilter() { - return 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; - } - - public void unsetMax_parts() { - this.__isset.max_parts = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case FILTER: - return getFilter(); - - case MAX_PARTS: - return new Short(getMax_parts()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_filter_args) - return this.equals((get_partitions_by_filter_args)that); - return false; - } - - public boolean equals(get_partitions_by_filter_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) - return false; - if (!this.filter.equals(that.filter)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FILTER: - if (field.type == TType.STRING) { - this.filter = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); - } - - public get_partitions_by_filter_result() { - } - - public get_partitions_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_filter_result(get_partitions_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_partitions_by_filter_result clone() { - return new get_partitions_by_filter_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_filter_result) - return this.equals((get_partitions_by_filter_result)that); - return false; - } - - public boolean equals(get_partitions_by_filter_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list123 = iprot.readListBegin(); - this.success = new ArrayList(_list123.size); - for (int _i124 = 0; _i124 < _list123.size; ++_i124) - { - Partition _elem125; - _elem125 = new Partition(); - _elem125.read(iprot); - this.success.add(_elem125); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter126 : this.success) { - _iter126.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); - } - - public alter_partition_args() { - } - - public alter_partition_args( - String db_name, - String tbl_name, - Partition new_part) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_args(alter_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - } - - @Override - public alter_partition_args clone() { - return new alter_partition_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - // 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) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_PART: - return getNew_part(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_args) - return this.equals((alter_partition_args)that); - return false; - } - - public boolean equals(alter_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NEW_PART: - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); - } - - public alter_partition_result() { - } - - public alter_partition_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_result(alter_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public alter_partition_result clone() { - return new alter_partition_result(this); - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_result) - return this.equals((alter_partition_result)that); - return false; - } - - public boolean equals(alter_partition_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); - } - - public get_config_value_args() { - } - - public get_config_value_args( - String name, - String defaultValue) - { - this(); - this.name = name; - this.defaultValue = defaultValue; - } - - /** - * Performs a deep copy on other. - */ - public get_config_value_args(get_config_value_args other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetDefaultValue()) { - this.defaultValue = other.defaultValue; - } - } - - @Override - public get_config_value_args clone() { - return new get_config_value_args(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public String getDefaultValue() { - return this.defaultValue; - } - - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - public void unsetDefaultValue() { - this.defaultValue = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DEFAULTVALUE: - if (value == null) { - unsetDefaultValue(); - } else { - setDefaultValue((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case DEFAULTVALUE: - return getDefaultValue(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case DEFAULTVALUE: - return isSetDefaultValue(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_config_value_args) - return this.equals((get_config_value_args)that); - return false; - } - - public boolean equals(get_config_value_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_defaultValue = true && this.isSetDefaultValue(); - boolean that_present_defaultValue = true && that.isSetDefaultValue(); - if (this_present_defaultValue || that_present_defaultValue) { - if (!(this_present_defaultValue && that_present_defaultValue)) - return false; - if (!this.defaultValue.equals(that.defaultValue)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DEFAULTVALUE: - if (field.type == TType.STRING) { - this.defaultValue = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("defaultValue:"); - if (this.defaultValue == null) { - sb.append("null"); - } else { - sb.append(this.defaultValue); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); - } - - public get_config_value_result() { - } - - public get_config_value_result( - String success, - ConfigValSecurityException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_config_value_result(get_config_value_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new ConfigValSecurityException(other.o1); - } - } - - @Override - public get_config_value_result clone() { - return new get_config_value_result(this); - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public ConfigValSecurityException getO1() { - return this.o1; - } - - public void setO1(ConfigValSecurityException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((ConfigValSecurityException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_config_value_result) - return this.equals((get_config_value_result)that); - return false; - } - - public boolean equals(get_config_value_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRING) { - this.success = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new ConfigValSecurityException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); - } - - public partition_name_to_vals_args() { - } - - public partition_name_to_vals_args( - String part_name) - { - this(); - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_vals_args(partition_name_to_vals_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - @Override - public partition_name_to_vals_args clone() { - return new partition_name_to_vals_args(this); - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - // 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) { - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case PART_NAME: - return getPart_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case PART_NAME: - return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_vals_args) - return this.equals((partition_name_to_vals_args)that); - return false; - } - - public boolean equals(partition_name_to_vals_args that) { - if (that == null) - return false; - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); - boolean first = true; - - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); - } - - public partition_name_to_vals_result() { - } - - public partition_name_to_vals_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_vals_result(partition_name_to_vals_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public partition_name_to_vals_result clone() { - return new partition_name_to_vals_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_vals_result) - return this.equals((partition_name_to_vals_result)that); - return false; - } - - public boolean equals(partition_name_to_vals_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list127 = iprot.readListBegin(); - this.success = new ArrayList(_list127.size); - for (int _i128 = 0; _i128 < _list127.size; ++_i128) - { - String _elem129; - _elem129 = iprot.readString(); - this.success.add(_elem129); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter130 : this.success) { - oprot.writeString(_iter130); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); - } - - public partition_name_to_spec_args() { - } - - public partition_name_to_spec_args( - String part_name) - { - this(); - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_args(partition_name_to_spec_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - @Override - public partition_name_to_spec_args clone() { - return new partition_name_to_spec_args(this); - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - // 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) { - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case PART_NAME: - return getPart_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case PART_NAME: - return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_spec_args) - return this.equals((partition_name_to_spec_args)that); - return false; - } - - public boolean equals(partition_name_to_spec_args that) { - if (that == null) - return false; - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); - boolean first = true; - - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(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, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); - } - - public partition_name_to_spec_result() { - } - - public partition_name_to_spec_result( - Map success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_result(partition_name_to_spec_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__success_copy_key = other_element_key; - - String __this__success_copy_value = other_element_value; - - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public partition_name_to_spec_result clone() { - return new partition_name_to_spec_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { - return this.success; - } - - public void setSuccess(Map success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_spec_result) - return this.equals((partition_name_to_spec_result)that); - return false; - } - - public boolean equals(partition_name_to_spec_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.MAP) { - { - TMap _map131 = iprot.readMapBegin(); - this.success = new HashMap(2*_map131.size); - for (int _i132 = 0; _i132 < _map131.size; ++_i132) - { - String _key133; - String _val134; - _key133 = iprot.readString(); - _val134 = iprot.readString(); - this.success.put(_key133, _val134); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter135 : this.success.entrySet()) { - oprot.writeString(_iter135.getKey()); - oprot.writeString(_iter135.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); - } - - public add_index_args() { - } - - public add_index_args( - Index new_index, - Table index_table) - { - this(); - this.new_index = new_index; - this.index_table = index_table; - } - - /** - * Performs a deep copy on other. - */ - public add_index_args(add_index_args other) { - if (other.isSetNew_index()) { - this.new_index = new Index(other.new_index); - } - if (other.isSetIndex_table()) { - this.index_table = new Table(other.index_table); - } - } - - @Override - public add_index_args clone() { - return new add_index_args(this); - } - - public Index getNew_index() { - return this.new_index; - } - - public void setNew_index(Index new_index) { - this.new_index = new_index; - } - - public void unsetNew_index() { - this.new_index = null; - } - - // 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 Table getIndex_table() { - return this.index_table; - } - - public void setIndex_table(Table index_table) { - this.index_table = index_table; - } - - public void unsetIndex_table() { - this.index_table = null; - } - - // 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) { - case NEW_INDEX: - if (value == null) { - unsetNew_index(); - } else { - setNew_index((Index)value); - } - break; - - case INDEX_TABLE: - if (value == null) { - unsetIndex_table(); - } else { - setIndex_table((Table)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NEW_INDEX: - return getNew_index(); - - case INDEX_TABLE: - return getIndex_table(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NEW_INDEX: - return isSetNew_index(); - case INDEX_TABLE: - return isSetIndex_table(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_index_args) - return this.equals((add_index_args)that); - return false; - } - - public boolean equals(add_index_args that) { - if (that == null) - return false; - - boolean this_present_new_index = true && this.isSetNew_index(); - boolean that_present_new_index = true && that.isSetNew_index(); - if (this_present_new_index || that_present_new_index) { - if (!(this_present_new_index && that_present_new_index)) - return false; - if (!this.new_index.equals(that.new_index)) - return false; - } - - boolean this_present_index_table = true && this.isSetIndex_table(); - boolean that_present_index_table = true && that.isSetIndex_table(); - if (this_present_index_table || that_present_index_table) { - if (!(this_present_index_table && that_present_index_table)) - return false; - if (!this.index_table.equals(that.index_table)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NEW_INDEX: - if (field.type == TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEX_TABLE: - if (field.type == TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); - oprot.writeFieldEnd(); - } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("add_index_args("); - boolean first = true; - - sb.append("new_index:"); - if (this.new_index == null) { - sb.append("null"); - } else { - sb.append(this.new_index); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_table:"); - if (this.index_table == null) { - sb.append("null"); - } else { - sb.append(this.index_table); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); - } - - public add_index_result() { - } - - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_index_result(add_index_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - @Override - public add_index_result clone() { - return new add_index_result(this); - } - - public Index getSuccess() { - return this.success; - } - - public void setSuccess(Index success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Index)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_index_result) - return this.equals((add_index_result)that); - return false; - } - - public boolean equals(add_index_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("add_index_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class alter_index_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_index_args"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField BASE_TBL_NAME_FIELD_DESC = new TField("base_tbl_name", TType.STRING, (short)2); - private static final TField IDX_NAME_FIELD_DESC = new TField("idx_name", TType.STRING, (short)3); - private static final TField NEW_IDX_FIELD_DESC = new TField("new_idx", TType.STRUCT, (short)4); - - private String dbname; - public static final int DBNAME = 1; - private String base_tbl_name; - public static final int BASE_TBL_NAME = 2; - private String idx_name; - public static final int IDX_NAME = 3; - private Index new_idx; - public static final int NEW_IDX = 4; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); - } - - public alter_index_args() { - } - - public alter_index_args( - String dbname, - String base_tbl_name, - String idx_name, - Index new_idx) - { - this(); - this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; - } - - /** - * Performs a deep copy on other. - */ - public alter_index_args(alter_index_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetBase_tbl_name()) { - this.base_tbl_name = other.base_tbl_name; - } - if (other.isSetIdx_name()) { - this.idx_name = other.idx_name; - } - if (other.isSetNew_idx()) { - this.new_idx = new Index(other.new_idx); - } - } - - @Override - public alter_index_args clone() { - return new alter_index_args(this); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - // Returns true if field dbname is set (has been asigned a value) and false otherwise - public boolean isSetDbname() { - return this.dbname != null; - } - - public String getBase_tbl_name() { - return this.base_tbl_name; - } - - public void setBase_tbl_name(String base_tbl_name) { - this.base_tbl_name = base_tbl_name; - } - - public void unsetBase_tbl_name() { - this.base_tbl_name = null; - } - - // Returns true if field base_tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetBase_tbl_name() { - return this.base_tbl_name != null; - } - - public String getIdx_name() { - return this.idx_name; - } - - public void setIdx_name(String idx_name) { - this.idx_name = idx_name; - } - - public void unsetIdx_name() { - this.idx_name = null; - } - - // Returns true if field idx_name is set (has been asigned a value) and false otherwise - public boolean isSetIdx_name() { - return this.idx_name != null; - } - - public Index getNew_idx() { - return this.new_idx; - } - - public void setNew_idx(Index new_idx) { - this.new_idx = new_idx; - } - - public void unsetNew_idx() { - this.new_idx = null; - } - - // Returns true if field new_idx is set (has been asigned a value) and false otherwise - public boolean isSetNew_idx() { - return this.new_idx != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case BASE_TBL_NAME: - if (value == null) { - unsetBase_tbl_name(); - } else { - setBase_tbl_name((String)value); - } - break; - - case IDX_NAME: - if (value == null) { - unsetIdx_name(); - } else { - setIdx_name((String)value); - } - break; - - case NEW_IDX: - if (value == null) { - unsetNew_idx(); - } else { - setNew_idx((Index)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DBNAME: - return getDbname(); - - case BASE_TBL_NAME: - return getBase_tbl_name(); - - case IDX_NAME: - return getIdx_name(); - - case NEW_IDX: - return getNew_idx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DBNAME: - return isSetDbname(); - case BASE_TBL_NAME: - return isSetBase_tbl_name(); - case IDX_NAME: - return isSetIdx_name(); - case NEW_IDX: - return isSetNew_idx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_index_args) - return this.equals((alter_index_args)that); - return false; - } - - public boolean equals(alter_index_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); - boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); - if (this_present_base_tbl_name || that_present_base_tbl_name) { - if (!(this_present_base_tbl_name && that_present_base_tbl_name)) - return false; - if (!this.base_tbl_name.equals(that.base_tbl_name)) - return false; - } - - boolean this_present_idx_name = true && this.isSetIdx_name(); - boolean that_present_idx_name = true && that.isSetIdx_name(); - if (this_present_idx_name || that_present_idx_name) { - if (!(this_present_idx_name && that_present_idx_name)) - return false; - if (!this.idx_name.equals(that.idx_name)) - return false; - } - - boolean this_present_new_idx = true && this.isSetNew_idx(); - boolean that_present_new_idx = true && that.isSetNew_idx(); - if (this_present_new_idx || that_present_new_idx) { - if (!(this_present_new_idx && that_present_new_idx)) - return false; - if (!this.new_idx.equals(that.new_idx)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BASE_TBL_NAME: - if (field.type == TType.STRING) { - this.base_tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IDX_NAME: - if (field.type == TType.STRING) { - this.idx_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NEW_IDX: - if (field.type == TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.base_tbl_name != null) { - oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); - oprot.writeString(this.base_tbl_name); - oprot.writeFieldEnd(); - } - if (this.idx_name != null) { - oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); - oprot.writeString(this.idx_name); - oprot.writeFieldEnd(); - } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_index_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("base_tbl_name:"); - if (this.base_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.base_tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("idx_name:"); - if (this.idx_name == null) { - sb.append("null"); - } else { - sb.append(this.idx_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_idx:"); - if (this.new_idx == null) { - sb.append("null"); - } else { - sb.append(this.new_idx); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class alter_index_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_index_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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); - } - - public alter_index_result() { - } - - public alter_index_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_index_result(alter_index_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public alter_index_result clone() { - return new alter_index_result(this); - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_index_result) - return this.equals((alter_index_result)that); - return false; - } - - public boolean equals(alter_index_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); - } - - public drop_index_by_name_args() { - } - - public drop_index_by_name_args( - String db_name, - String tbl_name, - String index_name, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - /** - * Performs a deep copy on other. - */ - public drop_index_by_name_args(drop_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; - } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; - } - - @Override - public drop_index_by_name_args clone() { - return new drop_index_by_name_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getIndex_name() { - return this.index_name; - } - - public void setIndex_name(String index_name) { - this.index_name = index_name; - } - - public void unsetIndex_name() { - this.index_name = null; - } - - // Returns true if field index_name is set (has been asigned a value) and false otherwise - public boolean isSetIndex_name() { - return this.index_name != null; - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; - } - - public void unsetDeleteData() { - this.__isset.deleteData = false; - } - - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: - if (value == null) { - unsetIndex_name(); - } else { - setIndex_name((String)value); - } - break; - - case DELETEDATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); - - case DELETEDATA: - return new Boolean(isDeleteData()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - case DELETEDATA: - return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_index_by_name_args) - return this.equals((drop_index_by_name_args)that); - return false; - } - - public boolean equals(drop_index_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) - return false; - if (!this.index_name.equals(that.index_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEX_NAME: - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { - sb.append("null"); - } else { - sb.append(this.index_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); - } - - public drop_index_by_name_result() { - } - - public drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_index_by_name_result(drop_index_by_name_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public drop_index_by_name_result clone() { - return new drop_index_by_name_result(this); - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; - } - - public void unsetSuccess() { - this.__isset.success = false; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_index_by_name_result) - return this.equals((drop_index_by_name_result)that); - return false; - } - - public boolean equals(drop_index_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); - } - - public get_index_by_name_args() { - } - - public get_index_by_name_args( - String db_name, - String tbl_name, - String index_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - } - - /** - * Performs a deep copy on other. - */ - public get_index_by_name_args(get_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; - } - } - - @Override - public get_index_by_name_args clone() { - return new get_index_by_name_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public String getIndex_name() { - return this.index_name; - } - - public void setIndex_name(String index_name) { - this.index_name = index_name; - } - - public void unsetIndex_name() { - this.index_name = null; - } - - // Returns true if field index_name is set (has been asigned a value) and false otherwise - public boolean isSetIndex_name() { - return this.index_name != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: - if (value == null) { - unsetIndex_name(); - } else { - setIndex_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_by_name_args) - return this.equals((get_index_by_name_args)that); - return false; - } - - public boolean equals(get_index_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) - return false; - if (!this.index_name.equals(that.index_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEX_NAME: - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { - sb.append("null"); - } else { - sb.append(this.index_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); - } - - public get_index_by_name_result() { - } - - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_index_by_name_result(get_index_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - @Override - public get_index_by_name_result clone() { - return new get_index_by_name_result(this); - } - - public Index getSuccess() { - return this.success; - } - - public void setSuccess(Index success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Index)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_by_name_result) - return this.equals((get_index_by_name_result)that); - return false; - } - - public boolean equals(get_index_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); - } - - public get_indexes_args() { - this.max_indexes = (short)-1; - - } - - public get_indexes_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; - } - - /** - * Performs a deep copy on other. - */ - public get_indexes_args(get_indexes_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_indexes = other.__isset.max_indexes; - this.max_indexes = other.max_indexes; - } - - @Override - public get_indexes_args clone() { - return new get_indexes_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return 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; - } - - public void unsetMax_indexes() { - this.__isset.max_indexes = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_INDEXES: - if (value == null) { - unsetMax_indexes(); - } else { - setMax_indexes((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return new Short(getMax_indexes()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_args) - return this.equals((get_indexes_args)that); - return false; - } - - public boolean equals(get_indexes_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) - return false; - if (this.max_indexes != that.max_indexes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_INDEXES: - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Index.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); - } - - public get_indexes_result() { - } - - public get_indexes_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_indexes_result(get_indexes_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Index other_element : other.success) { - __this__success.add(new Index(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_indexes_result clone() { - return new get_indexes_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Index elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); - return false; - } - - public boolean equals(get_indexes_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list136 = iprot.readListBegin(); - this.success = new ArrayList(_list136.size); - for (int _i137 = 0; _i137 < _list136.size; ++_i137) - { - Index _elem138; - _elem138 = new Index(); - _elem138.read(iprot); - this.success.add(_elem138); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter139 : this.success) { - _iter139.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); - } - - public get_index_names_args() { - this.max_indexes = (short)-1; - - } - - public get_index_names_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; - } - - /** - * Performs a deep copy on other. - */ - public get_index_names_args(get_index_names_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_indexes = other.__isset.max_indexes; - this.max_indexes = other.max_indexes; - } - - @Override - public get_index_names_args clone() { - return new get_index_names_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return 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; - } - - public void unsetMax_indexes() { - this.__isset.max_indexes = false; - } - - // 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; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_INDEXES: - if (value == null) { - unsetMax_indexes(); - } else { - setMax_indexes((Short)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return new Short(getMax_indexes()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case 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!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_names_args) - return this.equals((get_index_names_args)that); - return false; - } - - public boolean equals(get_index_names_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) - return false; - if (this.max_indexes != that.max_indexes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_INDEXES: - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); - } - - public get_index_names_result() { - } - - public get_index_names_result( - List success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_index_names_result(get_index_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_index_names_result clone() { - return new get_index_names_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_names_result) - return this.equals((get_index_names_result)that); - return false; - } - - public boolean equals(get_index_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list140 = iprot.readListBegin(); - this.success = new ArrayList(_list140.size); - for (int _i141 = 0; _i141 < _list140.size; ++_i141) - { - String _elem142; - _elem142 = iprot.readString(); - this.success.add(_elem142); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter143 : this.success) { - oprot.writeString(_iter143); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 3a49472..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java +++ /dev/null @@ -1,467 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TYPE1, new FieldMetaData("type1", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.STRING))); - put(TYPE2, new FieldMetaData("type2", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.STRING))); - put(FIELDS, new FieldMetaData("fields", TFieldRequirementType.OPTIONAL, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Type.class, metaDataMap); - } - - public Type() { - } - - public Type( - String name, - String type1, - String type2, - List fields) - { - this(); - this.name = name; - this.type1 = type1; - this.type2 = type2; - this.fields = fields; - } - - /** - * Performs a deep copy on other. - */ - public Type(Type other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetType1()) { - this.type1 = other.type1; - } - if (other.isSetType2()) { - this.type2 = other.type2; - } - if (other.isSetFields()) { - List __this__fields = new ArrayList(); - for (FieldSchema other_element : other.fields) { - __this__fields.add(new FieldSchema(other_element)); - } - this.fields = __this__fields; - } - } - - @Override - public Type clone() { - return new Type(this); - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; - } - - public String getType1() { - return this.type1; - } - - public void setType1(String type1) { - this.type1 = type1; - } - - public void unsetType1() { - this.type1 = null; - } - - // Returns true if field type1 is set (has been asigned a value) and false otherwise - public boolean isSetType1() { - return this.type1 != null; - } - - public String getType2() { - return this.type2; - } - - public void setType2(String type2) { - this.type2 = type2; - } - - public void unsetType2() { - this.type2 = null; - } - - // Returns true if field type2 is set (has been asigned a value) and false otherwise - public boolean isSetType2() { - return this.type2 != null; - } - - public int getFieldsSize() { - return (this.fields == null) ? 0 : this.fields.size(); - } - - public java.util.Iterator getFieldsIterator() { - return (this.fields == null) ? null : this.fields.iterator(); - } - - public void addToFields(FieldSchema elem) { - if (this.fields == null) { - this.fields = new ArrayList(); - } - this.fields.add(elem); - } - - public List getFields() { - return this.fields; - } - - public void setFields(List fields) { - this.fields = fields; - } - - public void unsetFields() { - this.fields = null; - } - - // 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) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case TYPE1: - if (value == null) { - unsetType1(); - } else { - setType1((String)value); - } - break; - - case TYPE2: - if (value == null) { - unsetType2(); - } else { - setType2((String)value); - } - break; - - case FIELDS: - if (value == null) { - unsetFields(); - } else { - setFields((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NAME: - return getName(); - - case TYPE1: - return getType1(); - - case TYPE2: - return getType2(); - - case FIELDS: - return getFields(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NAME: - return isSetName(); - case TYPE1: - return isSetType1(); - case TYPE2: - return isSetType2(); - case FIELDS: - return isSetFields(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Type) - return this.equals((Type)that); - return false; - } - - public boolean equals(Type that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_type1 = true && this.isSetType1(); - boolean that_present_type1 = true && that.isSetType1(); - if (this_present_type1 || that_present_type1) { - if (!(this_present_type1 && that_present_type1)) - return false; - if (!this.type1.equals(that.type1)) - return false; - } - - boolean this_present_type2 = true && this.isSetType2(); - boolean that_present_type2 = true && that.isSetType2(); - if (this_present_type2 || that_present_type2) { - if (!(this_present_type2 && that_present_type2)) - return false; - if (!this.type2.equals(that.type2)) - return false; - } - - boolean this_present_fields = true && this.isSetFields(); - boolean that_present_fields = true && that.isSetFields(); - if (this_present_fields || that_present_fields) { - if (!(this_present_fields && that_present_fields)) - return false; - if (!this.fields.equals(that.fields)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TYPE1: - if (field.type == TType.STRING) { - this.type1 = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TYPE2: - if (field.type == TType.STRING) { - this.type2 = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FIELDS: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.fields = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - FieldSchema _elem2; - _elem2 = new FieldSchema(); - _elem2.read(iprot); - this.fields.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type1 != null) { - if (isSetType1()) { - oprot.writeFieldBegin(TYPE1_FIELD_DESC); - oprot.writeString(this.type1); - oprot.writeFieldEnd(); - } - } - if (this.type2 != null) { - if (isSetType2()) { - oprot.writeFieldBegin(TYPE2_FIELD_DESC); - oprot.writeString(this.type2); - oprot.writeFieldEnd(); - } - } - if (this.fields != null) { - if (isSetFields()) { - oprot.writeFieldBegin(FIELDS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.fields.size())); - for (FieldSchema _iter3 : this.fields) { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Type("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (isSetType1()) { - if (!first) sb.append(", "); - sb.append("type1:"); - if (this.type1 == null) { - sb.append("null"); - } else { - sb.append(this.type1); - } - first = false; - } - if (isSetType2()) { - if (!first) sb.append(", "); - sb.append("type2:"); - if (this.type2 == null) { - sb.append("null"); - } else { - sb.append(this.type2); - } - first = false; - } - if (isSetFields()) { - if (!first) sb.append(", "); - sb.append("fields:"); - if (this.fields == null) { - sb.append("null"); - } else { - sb.append(this.fields); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java deleted file mode 100644 index ed666e7..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(UnknownDBException.class, metaDataMap); - } - - public UnknownDBException() { - } - - public UnknownDBException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public UnknownDBException(UnknownDBException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public UnknownDBException clone() { - return new UnknownDBException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnknownDBException) - return this.equals((UnknownDBException)that); - return false; - } - - public boolean equals(UnknownDBException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("UnknownDBException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index fe10e4a..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(UnknownTableException.class, metaDataMap); - } - - public UnknownTableException() { - } - - public UnknownTableException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public UnknownTableException(UnknownTableException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - @Override - public UnknownTableException clone() { - return new UnknownTableException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnknownTableException) - return this.equals((UnknownTableException)that); - return false; - } - - public boolean equals(UnknownTableException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("UnknownTableException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws 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 deleted file mode 100644 index 6e61224..0000000 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.metastore.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Version.class, metaDataMap); - } - - public Version() { - } - - public Version( - String version, - String comments) - { - this(); - this.version = version; - this.comments = comments; - } - - /** - * Performs a deep copy on other. - */ - public Version(Version other) { - if (other.isSetVersion()) { - this.version = other.version; - } - if (other.isSetComments()) { - this.comments = other.comments; - } - } - - @Override - public Version clone() { - return new Version(this); - } - - public String getVersion() { - return this.version; - } - - public void setVersion(String version) { - this.version = version; - } - - public void unsetVersion() { - this.version = null; - } - - // Returns true if field version is set (has been asigned a value) and false otherwise - public boolean isSetVersion() { - return this.version != null; - } - - public String getComments() { - return this.comments; - } - - public void setComments(String comments) { - this.comments = comments; - } - - public void unsetComments() { - this.comments = null; - } - - // 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) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((String)value); - } - break; - - case COMMENTS: - if (value == null) { - unsetComments(); - } else { - setComments((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case VERSION: - return getVersion(); - - case COMMENTS: - return getComments(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case VERSION: - return isSetVersion(); - case COMMENTS: - return isSetComments(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Version) - return this.equals((Version)that); - return false; - } - - public boolean equals(Version that) { - if (that == null) - return false; - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_comments = true && this.isSetComments(); - boolean that_present_comments = true && that.isSetComments(); - if (this_present_comments || that_present_comments) { - if (!(this_present_comments && that_present_comments)) - return false; - if (!this.comments.equals(that.comments)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case VERSION: - if (field.type == TType.STRING) { - this.version = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COMMENTS: - if (field.type == TType.STRING) { - this.comments = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(this.version); - oprot.writeFieldEnd(); - } - if (this.comments != null) { - oprot.writeFieldBegin(COMMENTS_FIELD_DESC); - oprot.writeString(this.comments); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Version("); - boolean first = true; - - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("comments:"); - if (this.comments == null) { - sb.append("null"); - } else { - sb.append(this.comments); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git metastore/src/gen-php/ThriftHiveMetastore.php metastore/src/gen-php/ThriftHiveMetastore.php deleted file mode 100644 index 894379c..0000000 --- metastore/src/gen-php/ThriftHiveMetastore.php +++ /dev/null @@ -1,11172 +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 alter_index($dbname, $base_tbl_name, $idx_name, $new_idx) - { - $this->send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx); - $this->recv_alter_index(); - } - - public function send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx) - { - $args = new metastore_ThriftHiveMetastore_alter_index_args(); - $args->dbname = $dbname; - $args->base_tbl_name = $base_tbl_name; - $args->idx_name = $idx_name; - $args->new_idx = $new_idx; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_index', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_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_alter_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_alter_index_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 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_alter_index_args { - static $_TSPEC; - - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'base_tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'idx_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'new_idx', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['base_tbl_name'])) { - $this->base_tbl_name = $vals['base_tbl_name']; - } - if (isset($vals['idx_name'])) { - $this->idx_name = $vals['idx_name']; - } - if (isset($vals['new_idx'])) { - $this->new_idx = $vals['new_idx']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_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::STRING) { - $xfer += $input->readString($this->dbname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->base_tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->idx_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->new_idx = new metastore_Index(); - $xfer += $this->new_idx->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_index_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->base_tbl_name !== null) { - $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->base_tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->idx_name !== null) { - $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); - $xfer += $output->writeString($this->idx_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->new_idx !== null) { - if (!is_object($this->new_idx)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); - $xfer += $this->new_idx->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_alter_index_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_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 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_index_result'); - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -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_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/__init__.py metastore/src/gen-py/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote deleted file mode 100644 index ef9b192..0000000 --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ /dev/null @@ -1,345 +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 ThriftHiveMetastore -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 create_database(Database database)' - print ' Database get_database(string name)' - print ' void drop_database(string name, bool deleteData)' - print ' get_databases(string pattern)' - print ' get_all_databases()' - print ' Type get_type(string name)' - print ' bool create_type(Type type)' - print ' bool drop_type(string type)' - print ' get_type_all(string name)' - print ' get_fields(string db_name, string table_name)' - print ' get_schema(string db_name, string table_name)' - print ' void create_table(Table tbl)' - print ' void drop_table(string dbname, string name, bool deleteData)' - print ' get_tables(string db_name, string pattern)' - print ' get_all_tables(string db_name)' - print ' Table get_table(string dbname, string tbl_name)' - print ' void alter_table(string dbname, string tbl_name, Table new_tbl)' - print ' Partition add_partition(Partition new_part)' - print ' Partition append_partition(string db_name, string tbl_name, part_vals)' - print ' Partition append_partition_by_name(string db_name, string tbl_name, string part_name)' - print ' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)' - print ' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)' - print ' Partition get_partition(string db_name, string tbl_name, part_vals)' - print ' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)' - print ' get_partitions(string db_name, string tbl_name, i16 max_parts)' - print ' get_partition_names(string db_name, string tbl_name, i16 max_parts)' - print ' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' - print ' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' - print ' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)' - print ' void alter_partition(string db_name, string tbl_name, Partition new_part)' - print ' string get_config_value(string name, string defaultValue)' - print ' partition_name_to_vals(string part_name)' - print ' partition_name_to_spec(string part_name)' - print ' Index add_index(Index new_index, Table index_table)' - print ' void alter_index(string dbname, string base_tbl_name, string idx_name, Index new_idx)' - print ' bool drop_index_by_name(string db_name, string tbl_name, string index_name, bool deleteData)' - print ' Index get_index_by_name(string db_name, string tbl_name, string index_name)' - print ' get_indexes(string db_name, string tbl_name, i16 max_indexes)' - print ' get_index_names(string db_name, string tbl_name, i16 max_indexes)' - print '' - 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 = ThriftHiveMetastore.Client(protocol) -transport.open() - -if cmd == 'create_database': - if len(args) != 1: - print 'create_database requires 1 args' - sys.exit(1) - pp.pprint(client.create_database(eval(args[0]),)) - -elif cmd == 'get_database': - if len(args) != 1: - print 'get_database requires 1 args' - sys.exit(1) - pp.pprint(client.get_database(args[0],)) - -elif cmd == 'drop_database': - if len(args) != 2: - print 'drop_database requires 2 args' - sys.exit(1) - pp.pprint(client.drop_database(args[0],eval(args[1]),)) - -elif cmd == 'get_databases': - if len(args) != 1: - print 'get_databases requires 1 args' - sys.exit(1) - pp.pprint(client.get_databases(args[0],)) - -elif cmd == 'get_all_databases': - if len(args) != 0: - print 'get_all_databases requires 0 args' - sys.exit(1) - pp.pprint(client.get_all_databases()) - -elif cmd == 'get_type': - if len(args) != 1: - print 'get_type requires 1 args' - sys.exit(1) - pp.pprint(client.get_type(args[0],)) - -elif cmd == 'create_type': - if len(args) != 1: - print 'create_type requires 1 args' - sys.exit(1) - pp.pprint(client.create_type(eval(args[0]),)) - -elif cmd == 'drop_type': - if len(args) != 1: - print 'drop_type requires 1 args' - sys.exit(1) - pp.pprint(client.drop_type(args[0],)) - -elif cmd == 'get_type_all': - if len(args) != 1: - print 'get_type_all requires 1 args' - sys.exit(1) - pp.pprint(client.get_type_all(args[0],)) - -elif cmd == 'get_fields': - if len(args) != 2: - print 'get_fields requires 2 args' - sys.exit(1) - pp.pprint(client.get_fields(args[0],args[1],)) - -elif cmd == 'get_schema': - if len(args) != 2: - print 'get_schema requires 2 args' - sys.exit(1) - pp.pprint(client.get_schema(args[0],args[1],)) - -elif cmd == 'create_table': - if len(args) != 1: - print 'create_table requires 1 args' - sys.exit(1) - pp.pprint(client.create_table(eval(args[0]),)) - -elif cmd == 'drop_table': - if len(args) != 3: - print 'drop_table requires 3 args' - sys.exit(1) - pp.pprint(client.drop_table(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_tables': - if len(args) != 2: - print 'get_tables requires 2 args' - sys.exit(1) - pp.pprint(client.get_tables(args[0],args[1],)) - -elif cmd == 'get_all_tables': - if len(args) != 1: - print 'get_all_tables requires 1 args' - sys.exit(1) - pp.pprint(client.get_all_tables(args[0],)) - -elif cmd == 'get_table': - if len(args) != 2: - print 'get_table requires 2 args' - sys.exit(1) - pp.pprint(client.get_table(args[0],args[1],)) - -elif cmd == 'alter_table': - if len(args) != 3: - print 'alter_table requires 3 args' - sys.exit(1) - pp.pprint(client.alter_table(args[0],args[1],eval(args[2]),)) - -elif cmd == 'add_partition': - if len(args) != 1: - print 'add_partition requires 1 args' - sys.exit(1) - pp.pprint(client.add_partition(eval(args[0]),)) - -elif cmd == 'append_partition': - if len(args) != 3: - print 'append_partition requires 3 args' - sys.exit(1) - pp.pprint(client.append_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'append_partition_by_name': - if len(args) != 3: - print 'append_partition_by_name requires 3 args' - sys.exit(1) - pp.pprint(client.append_partition_by_name(args[0],args[1],args[2],)) - -elif cmd == 'drop_partition': - if len(args) != 4: - print 'drop_partition requires 4 args' - sys.exit(1) - pp.pprint(client.drop_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'drop_partition_by_name': - if len(args) != 4: - print 'drop_partition_by_name requires 4 args' - sys.exit(1) - pp.pprint(client.drop_partition_by_name(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'get_partition': - if len(args) != 3: - print 'get_partition requires 3 args' - sys.exit(1) - pp.pprint(client.get_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partition_by_name': - if len(args) != 3: - print 'get_partition_by_name requires 3 args' - sys.exit(1) - pp.pprint(client.get_partition_by_name(args[0],args[1],args[2],)) - -elif cmd == 'get_partitions': - if len(args) != 3: - print 'get_partitions requires 3 args' - sys.exit(1) - pp.pprint(client.get_partitions(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partition_names': - if len(args) != 3: - print 'get_partition_names requires 3 args' - sys.exit(1) - pp.pprint(client.get_partition_names(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partitions_ps': - if len(args) != 4: - print 'get_partitions_ps requires 4 args' - sys.exit(1) - pp.pprint(client.get_partitions_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'get_partition_names_ps': - if len(args) != 4: - print 'get_partition_names_ps requires 4 args' - sys.exit(1) - pp.pprint(client.get_partition_names_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'get_partitions_by_filter': - if len(args) != 4: - print 'get_partitions_by_filter requires 4 args' - sys.exit(1) - pp.pprint(client.get_partitions_by_filter(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'alter_partition': - if len(args) != 3: - print 'alter_partition requires 3 args' - sys.exit(1) - pp.pprint(client.alter_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_config_value': - if len(args) != 2: - print 'get_config_value requires 2 args' - sys.exit(1) - pp.pprint(client.get_config_value(args[0],args[1],)) - -elif cmd == 'partition_name_to_vals': - if len(args) != 1: - print 'partition_name_to_vals requires 1 args' - sys.exit(1) - pp.pprint(client.partition_name_to_vals(args[0],)) - -elif cmd == 'partition_name_to_spec': - if len(args) != 1: - print 'partition_name_to_spec requires 1 args' - sys.exit(1) - pp.pprint(client.partition_name_to_spec(args[0],)) - -elif cmd == 'add_index': - if len(args) != 2: - print 'add_index requires 2 args' - sys.exit(1) - pp.pprint(client.add_index(eval(args[0]),eval(args[1]),)) - -elif cmd == 'alter_index': - if len(args) != 4: - print 'alter_index requires 4 args' - sys.exit(1) - pp.pprint(client.alter_index(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'drop_index_by_name': - if len(args) != 4: - print 'drop_index_by_name requires 4 args' - sys.exit(1) - pp.pprint(client.drop_index_by_name(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'get_index_by_name': - if len(args) != 3: - print 'get_index_by_name requires 3 args' - sys.exit(1) - pp.pprint(client.get_index_by_name(args[0],args[1],args[2],)) - -elif cmd == 'get_indexes': - if len(args) != 3: - print 'get_indexes requires 3 args' - sys.exit(1) - pp.pprint(client.get_indexes(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_index_names': - if len(args) != 3: - print 'get_index_names requires 3 args' - sys.exit(1) - pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) - -transport.close() diff --git metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py deleted file mode 100644 index 02ea96a..0000000 --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py +++ /dev/null @@ -1,8502 +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.FacebookService -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(fb303.FacebookService.Iface): - """ - This interface is live. - """ - def create_database(self, database): - """ - Parameters: - - database - """ - pass - - def get_database(self, name): - """ - Parameters: - - name - """ - pass - - def drop_database(self, name, deleteData): - """ - Parameters: - - name - - deleteData - """ - pass - - def get_databases(self, pattern): - """ - Parameters: - - pattern - """ - pass - - def get_all_databases(self, ): - pass - - def get_type(self, name): - """ - Parameters: - - name - """ - pass - - def create_type(self, type): - """ - Parameters: - - type - """ - pass - - def drop_type(self, type): - """ - Parameters: - - type - """ - pass - - def get_type_all(self, name): - """ - Parameters: - - name - """ - pass - - def get_fields(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - pass - - def get_schema(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - pass - - def create_table(self, tbl): - """ - Parameters: - - tbl - """ - pass - - def drop_table(self, dbname, name, deleteData): - """ - Parameters: - - dbname - - name - - deleteData - """ - pass - - def get_tables(self, db_name, pattern): - """ - Parameters: - - db_name - - pattern - """ - pass - - def get_all_tables(self, db_name): - """ - Parameters: - - db_name - """ - pass - - def get_table(self, dbname, tbl_name): - """ - Parameters: - - dbname - - tbl_name - """ - pass - - def alter_table(self, dbname, tbl_name, new_tbl): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - """ - pass - - def add_partition(self, new_part): - """ - Parameters: - - new_part - """ - pass - - def append_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - pass - - def append_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - pass - - def drop_partition(self, db_name, tbl_name, part_vals, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - """ - pass - - def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - """ - pass - - def get_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - pass - - def get_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - pass - - def get_partitions(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - pass - - def get_partition_names(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - pass - - def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - pass - - def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - pass - - def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - pass - - def alter_partition(self, db_name, tbl_name, new_part): - """ - Parameters: - - db_name - - tbl_name - - new_part - """ - pass - - def get_config_value(self, name, defaultValue): - """ - Parameters: - - name - - defaultValue - """ - pass - - def partition_name_to_vals(self, part_name): - """ - Parameters: - - part_name - """ - pass - - def partition_name_to_spec(self, part_name): - """ - Parameters: - - part_name - """ - pass - - def add_index(self, new_index, index_table): - """ - Parameters: - - new_index - - index_table - """ - pass - - def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - """ - Parameters: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - pass - - def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - index_name - - deleteData - """ - pass - - def get_index_by_name(self, db_name, tbl_name, index_name): - """ - Parameters: - - db_name - - tbl_name - - index_name - """ - pass - - def get_indexes(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - pass - - def get_index_names(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - pass - - -class Client(fb303.FacebookService.Client, Iface): - """ - This interface is live. - """ - def __init__(self, iprot, oprot=None): - fb303.FacebookService.Client.__init__(self, iprot, oprot) - - def create_database(self, database): - """ - Parameters: - - database - """ - self.send_create_database(database) - self.recv_create_database() - - def send_create_database(self, database): - self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid) - args = create_database_args() - args.database = database - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_database(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = create_database_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - return - - def get_database(self, name): - """ - Parameters: - - name - """ - self.send_get_database(name) - return self.recv_get_database() - - def send_get_database(self, name): - self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid) - args = get_database_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_database(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_database_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); - - def drop_database(self, name, deleteData): - """ - Parameters: - - name - - deleteData - """ - self.send_drop_database(name, deleteData) - self.recv_drop_database() - - def send_drop_database(self, name, deleteData): - self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid) - args = drop_database_args() - args.name = name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_database(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_database_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - return - - def get_databases(self, pattern): - """ - Parameters: - - pattern - """ - self.send_get_databases(pattern) - return self.recv_get_databases() - - def send_get_databases(self, pattern): - self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid) - args = get_databases_args() - args.pattern = pattern - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_databases(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_databases_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); - - def get_all_databases(self, ): - self.send_get_all_databases() - return self.recv_get_all_databases() - - def send_get_all_databases(self, ): - self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid) - args = get_all_databases_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_databases(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_all_databases_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); - - def get_type(self, name): - """ - Parameters: - - name - """ - self.send_get_type(name) - return self.recv_get_type() - - def send_get_type(self, name): - self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid) - args = get_type_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_type(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_type_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); - - def create_type(self, type): - """ - Parameters: - - type - """ - self.send_create_type(type) - return self.recv_create_type() - - def send_create_type(self, type): - self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid) - args = create_type_args() - args.type = type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_type(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = create_type_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); - - def drop_type(self, type): - """ - Parameters: - - type - """ - self.send_drop_type(type) - return self.recv_drop_type() - - def send_drop_type(self, type): - self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid) - args = drop_type_args() - args.type = type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_type(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_type_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); - - def get_type_all(self, name): - """ - Parameters: - - name - """ - self.send_get_type_all(name) - return self.recv_get_type_all() - - def send_get_type_all(self, name): - self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid) - args = get_type_all_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_type_all(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_type_all_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); - - def get_fields(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - self.send_get_fields(db_name, table_name) - return self.recv_get_fields() - - def send_get_fields(self, db_name, table_name): - self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid) - args = get_fields_args() - args.db_name = db_name - args.table_name = table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_fields(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_fields_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); - - def get_schema(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - self.send_get_schema(db_name, table_name) - return self.recv_get_schema() - - def send_get_schema(self, db_name, table_name): - self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid) - args = get_schema_args() - args.db_name = db_name - args.table_name = table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_schema(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_schema_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); - - def create_table(self, tbl): - """ - Parameters: - - tbl - """ - self.send_create_table(tbl) - self.recv_create_table() - - def send_create_table(self, tbl): - self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid) - args = create_table_args() - args.tbl = tbl - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_table(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = create_table_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - if result.o4 != None: - raise result.o4 - return - - def drop_table(self, dbname, name, deleteData): - """ - Parameters: - - dbname - - name - - deleteData - """ - self.send_drop_table(dbname, name, deleteData) - self.recv_drop_table() - - def send_drop_table(self, dbname, name, deleteData): - self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid) - args = drop_table_args() - args.dbname = dbname - args.name = name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_table(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_table_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o3 != None: - raise result.o3 - return - - def get_tables(self, db_name, pattern): - """ - Parameters: - - db_name - - pattern - """ - self.send_get_tables(db_name, pattern) - return self.recv_get_tables() - - def send_get_tables(self, db_name, pattern): - self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid) - args = get_tables_args() - args.db_name = db_name - args.pattern = pattern - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_tables(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_tables_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); - - def get_all_tables(self, db_name): - """ - Parameters: - - db_name - """ - self.send_get_all_tables(db_name) - return self.recv_get_all_tables() - - def send_get_all_tables(self, db_name): - self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid) - args = get_all_tables_args() - args.db_name = db_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_tables(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_all_tables_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); - - def get_table(self, dbname, tbl_name): - """ - Parameters: - - dbname - - tbl_name - """ - self.send_get_table(dbname, tbl_name) - return self.recv_get_table() - - def send_get_table(self, dbname, tbl_name): - self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid) - args = get_table_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_table_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); - - def alter_table(self, dbname, tbl_name, new_tbl): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - """ - self.send_alter_table(dbname, tbl_name, new_tbl) - self.recv_alter_table() - - def send_alter_table(self, dbname, tbl_name, new_tbl): - self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid) - args = alter_table_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.new_tbl = new_tbl - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_table(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = alter_table_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - return - - def add_partition(self, new_part): - """ - Parameters: - - new_part - """ - self.send_add_partition(new_part) - return self.recv_add_partition() - - def send_add_partition(self, new_part): - self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid) - args = add_partition_args() - args.new_part = new_part - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partition(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = add_partition_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); - - def append_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - self.send_append_partition(db_name, tbl_name, part_vals) - return self.recv_append_partition() - - def send_append_partition(self, db_name, tbl_name, part_vals): - self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid) - args = append_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = append_partition_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); - - def append_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - self.send_append_partition_by_name(db_name, tbl_name, part_name) - return self.recv_append_partition_by_name() - - def send_append_partition_by_name(self, db_name, tbl_name, part_name): - self._oprot.writeMessageBegin('append_partition_by_name', TMessageType.CALL, self._seqid) - args = append_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition_by_name(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = append_partition_by_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); - - def drop_partition(self, db_name, tbl_name, part_vals, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - """ - self.send_drop_partition(db_name, tbl_name, part_vals, deleteData) - return self.recv_drop_partition() - - def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData): - self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid) - args = drop_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_partition_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); - - def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - """ - self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) - return self.recv_drop_partition_by_name() - - def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - self._oprot.writeMessageBegin('drop_partition_by_name', TMessageType.CALL, self._seqid) - args = drop_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition_by_name(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_partition_by_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); - - def get_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - self.send_get_partition(db_name, tbl_name, part_vals) - return self.recv_get_partition() - - def send_get_partition(self, db_name, tbl_name, part_vals): - self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid) - args = get_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partition_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); - - def get_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - self.send_get_partition_by_name(db_name, tbl_name, part_name) - return self.recv_get_partition_by_name() - - def send_get_partition_by_name(self, db_name, tbl_name, part_name): - self._oprot.writeMessageBegin('get_partition_by_name', TMessageType.CALL, self._seqid) - args = get_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_by_name(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partition_by_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); - - def get_partitions(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - self.send_get_partitions(db_name, tbl_name, max_parts) - return self.recv_get_partitions() - - def send_get_partitions(self, db_name, tbl_name, max_parts): - self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid) - args = get_partitions_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partitions_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); - - def get_partition_names(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - self.send_get_partition_names(db_name, tbl_name, max_parts) - return self.recv_get_partition_names() - - def send_get_partition_names(self, db_name, tbl_name, max_parts): - self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid) - args = get_partition_names_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_names(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partition_names_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); - - def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) - return self.recv_get_partitions_ps() - - def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - self._oprot.writeMessageBegin('get_partitions_ps', TMessageType.CALL, self._seqid) - args = 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.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_ps(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partitions_ps_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); - - def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) - return self.recv_get_partition_names_ps() - - def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - self._oprot.writeMessageBegin('get_partition_names_ps', TMessageType.CALL, self._seqid) - args = 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.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_names_ps(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partition_names_ps_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); - - def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) - return self.recv_get_partitions_by_filter() - - def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - self._oprot.writeMessageBegin('get_partitions_by_filter', TMessageType.CALL, self._seqid) - args = get_partitions_by_filter_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.filter = filter - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_by_filter(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_partitions_by_filter_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); - - def alter_partition(self, db_name, tbl_name, new_part): - """ - Parameters: - - db_name - - tbl_name - - new_part - """ - self.send_alter_partition(db_name, tbl_name, new_part) - self.recv_alter_partition() - - def send_alter_partition(self, db_name, tbl_name, new_part): - self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid) - args = alter_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.new_part = new_part - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_partition(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = alter_partition_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - return - - def get_config_value(self, name, defaultValue): - """ - Parameters: - - name - - defaultValue - """ - self.send_get_config_value(name, defaultValue) - return self.recv_get_config_value() - - def send_get_config_value(self, name, defaultValue): - self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid) - args = get_config_value_args() - args.name = name - args.defaultValue = defaultValue - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_config_value(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_config_value_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); - - def partition_name_to_vals(self, part_name): - """ - Parameters: - - part_name - """ - self.send_partition_name_to_vals(part_name) - return self.recv_partition_name_to_vals() - - def send_partition_name_to_vals(self, part_name): - self._oprot.writeMessageBegin('partition_name_to_vals', TMessageType.CALL, self._seqid) - args = partition_name_to_vals_args() - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_partition_name_to_vals(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = partition_name_to_vals_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); - - def partition_name_to_spec(self, part_name): - """ - Parameters: - - part_name - """ - self.send_partition_name_to_spec(part_name) - return self.recv_partition_name_to_spec() - - def send_partition_name_to_spec(self, part_name): - self._oprot.writeMessageBegin('partition_name_to_spec', TMessageType.CALL, self._seqid) - args = partition_name_to_spec_args() - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_partition_name_to_spec(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = partition_name_to_spec_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); - - def add_index(self, new_index, index_table): - """ - Parameters: - - new_index - - index_table - """ - self.send_add_index(new_index, index_table) - return self.recv_add_index() - - def send_add_index(self, new_index, index_table): - self._oprot.writeMessageBegin('add_index', TMessageType.CALL, self._seqid) - args = add_index_args() - args.new_index = new_index - args.index_table = index_table - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_index(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = add_index_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - if result.o3 != None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); - - def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - """ - Parameters: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - self.send_alter_index(dbname, base_tbl_name, idx_name, new_idx) - self.recv_alter_index() - - def send_alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - self._oprot.writeMessageBegin('alter_index', TMessageType.CALL, self._seqid) - args = alter_index_args() - args.dbname = dbname - args.base_tbl_name = base_tbl_name - args.idx_name = idx_name - args.new_idx = new_idx - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_index(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = alter_index_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - return - - def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - index_name - - deleteData - """ - self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) - return self.recv_drop_index_by_name() - - def send_drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - self._oprot.writeMessageBegin('drop_index_by_name', TMessageType.CALL, self._seqid) - args = drop_index_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.index_name = index_name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_index_by_name(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = drop_index_by_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); - - def get_index_by_name(self, db_name, tbl_name, index_name): - """ - Parameters: - - db_name - - tbl_name - - index_name - """ - self.send_get_index_by_name(db_name, tbl_name, index_name) - return self.recv_get_index_by_name() - - def send_get_index_by_name(self, db_name, tbl_name, index_name): - self._oprot.writeMessageBegin('get_index_by_name', TMessageType.CALL, self._seqid) - args = get_index_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.index_name = index_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_index_by_name(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_index_by_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); - - def get_indexes(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - self.send_get_indexes(db_name, tbl_name, max_indexes) - return self.recv_get_indexes() - - def send_get_indexes(self, db_name, tbl_name, max_indexes): - self._oprot.writeMessageBegin('get_indexes', TMessageType.CALL, self._seqid) - args = get_indexes_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_indexes = max_indexes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_indexes(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_indexes_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o1 != None: - raise result.o1 - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); - - def get_index_names(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - self.send_get_index_names(db_name, tbl_name, max_indexes) - return self.recv_get_index_names() - - def send_get_index_names(self, db_name, tbl_name, max_indexes): - self._oprot.writeMessageBegin('get_index_names', TMessageType.CALL, self._seqid) - args = get_index_names_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_indexes = max_indexes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_index_names(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_index_names_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.o2 != None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); - - -class Processor(fb303.FacebookService.Processor, Iface, TProcessor): - def __init__(self, handler): - fb303.FacebookService.Processor.__init__(self, handler) - self._processMap["create_database"] = Processor.process_create_database - self._processMap["get_database"] = Processor.process_get_database - self._processMap["drop_database"] = Processor.process_drop_database - self._processMap["get_databases"] = Processor.process_get_databases - self._processMap["get_all_databases"] = Processor.process_get_all_databases - self._processMap["get_type"] = Processor.process_get_type - self._processMap["create_type"] = Processor.process_create_type - self._processMap["drop_type"] = Processor.process_drop_type - self._processMap["get_type_all"] = Processor.process_get_type_all - self._processMap["get_fields"] = Processor.process_get_fields - self._processMap["get_schema"] = Processor.process_get_schema - self._processMap["create_table"] = Processor.process_create_table - self._processMap["drop_table"] = Processor.process_drop_table - self._processMap["get_tables"] = Processor.process_get_tables - self._processMap["get_all_tables"] = Processor.process_get_all_tables - self._processMap["get_table"] = Processor.process_get_table - self._processMap["alter_table"] = Processor.process_alter_table - self._processMap["add_partition"] = Processor.process_add_partition - self._processMap["append_partition"] = Processor.process_append_partition - self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name - self._processMap["drop_partition"] = Processor.process_drop_partition - self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name - self._processMap["get_partition"] = Processor.process_get_partition - self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name - self._processMap["get_partitions"] = Processor.process_get_partitions - self._processMap["get_partition_names"] = Processor.process_get_partition_names - self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps - self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps - self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter - self._processMap["alter_partition"] = Processor.process_alter_partition - self._processMap["get_config_value"] = Processor.process_get_config_value - self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals - self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec - self._processMap["add_index"] = Processor.process_add_index - self._processMap["alter_index"] = Processor.process_alter_index - self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name - self._processMap["get_index_by_name"] = Processor.process_get_index_by_name - self._processMap["get_indexes"] = Processor.process_get_indexes - self._processMap["get_index_names"] = Processor.process_get_index_names - - 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_create_database(self, seqid, iprot, oprot): - args = create_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_database_result() - try: - self._handler.create_database(args.database) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_database(self, seqid, iprot, oprot): - args = get_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_database_result() - try: - result.success = self._handler.get_database(args.name) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_database(self, seqid, iprot, oprot): - args = drop_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_database_result() - try: - self._handler.drop_database(args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except InvalidOperationException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_databases(self, seqid, iprot, oprot): - args = get_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_databases_result() - try: - result.success = self._handler.get_databases(args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_databases(self, seqid, iprot, oprot): - args = get_all_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_databases_result() - try: - result.success = self._handler.get_all_databases() - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_type(self, seqid, iprot, oprot): - args = get_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_result() - try: - result.success = self._handler.get_type(args.name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_type(self, seqid, iprot, oprot): - args = create_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_type_result() - try: - result.success = self._handler.create_type(args.type) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_type(self, seqid, iprot, oprot): - args = drop_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_type_result() - try: - result.success = self._handler.drop_type(args.type) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_type_all(self, seqid, iprot, oprot): - args = get_type_all_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_all_result() - try: - result.success = self._handler.get_type_all(args.name) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_fields(self, seqid, iprot, oprot): - args = get_fields_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_fields_result() - try: - result.success = self._handler.get_fields(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_schema(self, seqid, iprot, oprot): - args = get_schema_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_schema_result() - try: - result.success = self._handler.get_schema(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_table(self, seqid, iprot, oprot): - args = create_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_result() - try: - self._handler.create_table(args.tbl) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - except NoSuchObjectException, o4: - result.o4 = o4 - oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_table(self, seqid, iprot, oprot): - args = drop_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_table_result() - try: - self._handler.drop_table(args.dbname, args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_tables(self, seqid, iprot, oprot): - args = get_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_tables_result() - try: - result.success = self._handler.get_tables(args.db_name, args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_tables(self, seqid, iprot, oprot): - args = get_all_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_tables_result() - try: - result.success = self._handler.get_all_tables(args.db_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table(self, seqid, iprot, oprot): - args = get_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_result() - try: - result.success = self._handler.get_table(args.dbname, args.tbl_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_table(self, seqid, iprot, oprot): - args = alter_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_table_result() - try: - self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partition(self, seqid, iprot, oprot): - args = add_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partition_result() - try: - result.success = self._handler.add_partition(args.new_part) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition(self, seqid, iprot, oprot): - args = append_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_result() - try: - result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition_by_name(self, seqid, iprot, oprot): - args = append_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_by_name_result() - try: - result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition(self, seqid, iprot, oprot): - args = drop_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_result() - try: - result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition_by_name(self, seqid, iprot, oprot): - args = drop_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_by_name_result() - try: - result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition(self, seqid, iprot, oprot): - args = get_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_result() - try: - result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_by_name(self, seqid, iprot, oprot): - args = get_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_by_name_result() - try: - result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions(self, seqid, iprot, oprot): - args = get_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_result() - try: - result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_names(self, seqid, iprot, oprot): - args = get_partition_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_result() - try: - result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_ps(self, seqid, iprot, oprot): - args = get_partitions_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_ps_result() - try: - result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_names_ps(self, seqid, iprot, oprot): - args = get_partition_names_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_ps_result() - try: - result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_by_filter(self, seqid, iprot, oprot): - args = get_partitions_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_by_filter_result() - try: - result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_partition(self, seqid, iprot, oprot): - args = alter_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partition_result() - try: - self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_config_value(self, seqid, iprot, oprot): - args = get_config_value_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_config_value_result() - try: - result.success = self._handler.get_config_value(args.name, args.defaultValue) - except ConfigValSecurityException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_partition_name_to_vals(self, seqid, iprot, oprot): - args = partition_name_to_vals_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_vals_result() - try: - result.success = self._handler.partition_name_to_vals(args.part_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_partition_name_to_spec(self, seqid, iprot, oprot): - args = partition_name_to_spec_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_spec_result() - try: - result.success = self._handler.partition_name_to_spec(args.part_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_index(self, seqid, iprot, oprot): - args = add_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_index_result() - try: - result.success = self._handler.add_index(args.new_index, args.index_table) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_index(self, seqid, iprot, oprot): - args = alter_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_index_result() - try: - self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_index_by_name(self, seqid, iprot, oprot): - args = drop_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_index_by_name_result() - try: - result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_index_by_name(self, seqid, iprot, oprot): - args = get_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_by_name_result() - try: - result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_indexes(self, seqid, iprot, oprot): - args = get_indexes_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_indexes_result() - try: - result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_index_names(self, seqid, iprot, oprot): - args = get_index_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_names_result() - try: - result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class create_database_args: - """ - Attributes: - - database - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 - ) - - def __init__(self, database=None,): - self.database = database - - 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.database = Database() - self.database.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_database_args') - if self.database != None: - oprot.writeFieldBegin('database', TType.STRUCT, 1) - self.database.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_database_result: - """ - Attributes: - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - 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.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_database_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_database_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_database_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Database() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_database_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_database_args: - """ - Attributes: - - name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.BOOL, 'deleteData', None, None, ), # 2 - ) - - def __init__(self, name=None, deleteData=None,): - self.name = name - self.deleteData = deleteData - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 2) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_database_result: - """ - Attributes: - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - 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.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_database_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_databases_args: - """ - Attributes: - - pattern - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'pattern', None, None, ), # 1 - ) - - def __init__(self, pattern=None,): - self.pattern = pattern - - 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.pattern = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_databases_args') - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 1) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_databases_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype106, _size103) = iprot.readListBegin() - for _i107 in xrange(_size103): - _elem108 = iprot.readString(); - self.success.append(_elem108) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_databases_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter109 in self.success: - oprot.writeString(iter109) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_databases_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_databases_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_databases_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype113, _size110) = iprot.readListBegin() - for _i114 in xrange(_size110): - _elem115 = iprot.readString(); - self.success.append(_elem115) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_databases_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter116 in self.success: - oprot.writeString(iter116) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Type() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_type_args: - """ - Attributes: - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 - ) - - def __init__(self, type=None,): - self.type = type - - 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.type = Type() - self.type.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRUCT, 1) - self.type.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_type_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_type_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_type_args: - """ - Attributes: - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'type', None, None, ), # 1 - ) - - def __init__(self, type=None,): - self.type = type - - 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.type = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_type_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_type_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_all_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_all_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_all_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - 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.MAP: - self.success = {} - (_ktype118, _vtype119, _size117 ) = iprot.readMapBegin() - for _i121 in xrange(_size117): - _key122 = iprot.readString(); - _val123 = Type() - _val123.read(iprot) - self.success[_key122] = _val123 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_all_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter124,viter125 in self.success.items(): - oprot.writeString(kiter124) - viter125.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_args: - """ - Attributes: - - db_name - - table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, table_name=None,): - self.db_name = db_name - self.table_name = table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - 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 = [] - (_etype129, _size126) = iprot.readListBegin() - for _i130 in xrange(_size126): - _elem131 = FieldSchema() - _elem131.read(iprot) - self.success.append(_elem131) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter132 in self.success: - iter132.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_args: - """ - Attributes: - - db_name - - table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, table_name=None,): - self.db_name = db_name - self.table_name = table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - 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 = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in xrange(_size133): - _elem138 = FieldSchema() - _elem138.read(iprot) - self.success.append(_elem138) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter139 in self.success: - iter139.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_args: - """ - Attributes: - - tbl - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 - ) - - def __init__(self, tbl=None,): - self.tbl = tbl - - 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.tbl = Table() - self.tbl.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_args') - if self.tbl != None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 != None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_args: - """ - Attributes: - - dbname - - name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 - (3, TType.BOOL, 'deleteData', None, None, ), # 3 - ) - - def __init__(self, dbname=None, name=None, deleteData=None,): - self.dbname = dbname - self.name = name - self.deleteData = deleteData - - 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.dbname = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_result: - """ - Attributes: - - o1 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o3=None,): - self.o1 = o1 - self.o3 = o3 - - 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.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_args: - """ - Attributes: - - db_name - - pattern - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 - ) - - def __init__(self, db_name=None, pattern=None,): - self.db_name = db_name - self.pattern = pattern - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype143, _size140) = iprot.readListBegin() - for _i144 in xrange(_size140): - _elem145 = iprot.readString(); - self.success.append(_elem145) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter146 in self.success: - oprot.writeString(iter146) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_tables_args: - """ - Attributes: - - db_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - ) - - def __init__(self, db_name=None,): - self.db_name = db_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_tables_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype150, _size147) = iprot.readListBegin() - for _i151 in xrange(_size147): - _elem152 = iprot.readString(); - self.success.append(_elem152) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_tables_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter153 in self.success: - oprot.writeString(iter153) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_args: - """ - Attributes: - - dbname - - tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - ) - - def __init__(self, dbname=None, tbl_name=None,): - self.dbname = dbname - self.tbl_name = tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Table() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_args: - """ - Attributes: - - dbname - - tbl_name - - new_tbl - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 - ) - - def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): - self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl - - 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.dbname = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.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('alter_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_tbl != None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - 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.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - 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('alter_table_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_args: - """ - Attributes: - - new_part - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 - ) - - def __init__(self, new_part=None,): - self.new_part = new_part - - 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.new_part = Partition() - self.new_part.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('add_partition_args') - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 1) - self.new_part.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - 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('add_partition_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype157, _size154) = iprot.readListBegin() - for _i158 in xrange(_size154): - _elem159 = iprot.readString(); - self.part_vals.append(_elem159) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter160 in self.part_vals: - oprot.writeString(iter160) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - 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('append_partition_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - 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('append_partition_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - 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('append_partition_by_name_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype164, _size161) = iprot.readListBegin() - for _i165 in xrange(_size161): - _elem166 = iprot.readString(); - self.part_vals.append(_elem166) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter167 in self.part_vals: - oprot.writeString(iter167) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype171, _size168) = iprot.readListBegin() - for _i172 in xrange(_size168): - _elem173 = iprot.readString(); - self.part_vals.append(_elem173) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter174 in self.part_vals: - oprot.writeString(iter174) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_by_name_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - 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 = [] - (_etype178, _size175) = iprot.readListBegin() - for _i179 in xrange(_size175): - _elem180 = Partition() - _elem180.read(iprot) - self.success.append(_elem180) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter181 in self.success: - iter181.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - 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 = [] - (_etype185, _size182) = iprot.readListBegin() - for _i186 in xrange(_size182): - _elem187 = iprot.readString(); - self.success.append(_elem187) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter188 in self.success: - oprot.writeString(iter188) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype192, _size189) = iprot.readListBegin() - for _i193 in xrange(_size189): - _elem194 = iprot.readString(); - self.part_vals.append(_elem194) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter195 in self.part_vals: - oprot.writeString(iter195) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype199, _size196) = iprot.readListBegin() - for _i200 in xrange(_size196): - _elem201 = Partition() - _elem201.read(iprot) - self.success.append(_elem201) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter202 in self.success: - iter202.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_ps_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype206, _size203) = iprot.readListBegin() - for _i207 in xrange(_size203): - _elem208 = iprot.readString(); - self.part_vals.append(_elem208) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_ps_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter209 in self.part_vals: - oprot.writeString(iter209) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_ps_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype213, _size210) = iprot.readListBegin() - for _i214 in xrange(_size210): - _elem215 = iprot.readString(); - self.success.append(_elem215) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_ps_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter216 in self.success: - oprot.writeString(iter216) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_filter_args: - """ - Attributes: - - db_name - - tbl_name - - filter - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_filter_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.filter != None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_filter_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - 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 = [] - (_etype220, _size217) = iprot.readListBegin() - for _i221 in xrange(_size217): - _elem222 = Partition() - _elem222.read(iprot) - self.success.append(_elem222) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_filter_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter223 in self.success: - iter223.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_args: - """ - Attributes: - - db_name - - tbl_name - - new_part - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, new_part=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.new_part = new_part - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.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('alter_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 3) - self.new_part.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - 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.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - 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('alter_partition_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_config_value_args: - """ - Attributes: - - name - - defaultValue - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 - ) - - def __init__(self, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.defaultValue = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_config_value_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.defaultValue != None: - oprot.writeFieldBegin('defaultValue', TType.STRING, 2) - oprot.writeString(self.defaultValue) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_config_value_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = ConfigValSecurityException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_config_value_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_vals_args: - """ - Attributes: - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 - ) - - def __init__(self, part_name=None,): - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_vals_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_vals_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype227, _size224) = iprot.readListBegin() - for _i228 in xrange(_size224): - _elem229 = iprot.readString(); - self.success.append(_elem229) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_vals_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter230 in self.success: - oprot.writeString(iter230) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_spec_args: - """ - Attributes: - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 - ) - - def __init__(self, part_name=None,): - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_spec_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_spec_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype232, _vtype233, _size231 ) = iprot.readMapBegin() - for _i235 in xrange(_size231): - _key236 = iprot.readString(); - _val237 = iprot.readString(); - self.success[_key236] = _val237 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_spec_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter238,viter239 in self.success.items(): - oprot.writeString(kiter238) - oprot.writeString(viter239) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_index_args: - """ - Attributes: - - new_index - - index_table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 - ) - - def __init__(self, new_index=None, index_table=None,): - self.new_index = new_index - self.index_table = index_table - - 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.new_index = Index() - self.new_index.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.index_table = Table() - self.index_table.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('add_index_args') - if self.new_index != None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) - oprot.writeFieldEnd() - if self.index_table != None: - oprot.writeFieldBegin('index_table', TType.STRUCT, 2) - self.index_table.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_index_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - 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('add_index_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_index_args: - """ - Attributes: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 - (3, TType.STRING, 'idx_name', None, None, ), # 3 - (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 - ) - - def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): - self.dbname = dbname - self.base_tbl_name = base_tbl_name - self.idx_name = idx_name - self.new_idx = new_idx - - 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.dbname = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.base_tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.idx_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.new_idx = Index() - self.new_idx.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('alter_index_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.base_tbl_name != None: - oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) - oprot.writeString(self.base_tbl_name) - oprot.writeFieldEnd() - if self.idx_name != None: - oprot.writeFieldBegin('idx_name', TType.STRING, 3) - oprot.writeString(self.idx_name) - oprot.writeFieldEnd() - if self.new_idx != None: - oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) - self.new_idx.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_index_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - 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.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - 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('alter_index_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_index_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - index_name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_index_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_index_by_name_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - index_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, index_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_by_name_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_indexes_args: - """ - Attributes: - - db_name - - tbl_name - - max_indexes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_indexes_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_indexes_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - 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 = [] - (_etype243, _size240) = iprot.readListBegin() - for _i244 in xrange(_size240): - _elem245 = Index() - _elem245.read(iprot) - self.success.append(_elem245) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_indexes_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter246 in self.success: - iter246.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_names_args: - """ - Attributes: - - db_name - - tbl_name - - max_indexes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_names_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_names_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - 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 = [] - (_etype250, _size247) = iprot.readListBegin() - for _i251 in xrange(_size247): - _elem252 = iprot.readString(); - self.success.append(_elem252) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_names_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter253 in self.success: - oprot.writeString(iter253) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - diff --git metastore/src/gen-py/hive_metastore/__init__.py metastore/src/gen-py/hive_metastore/__init__.py deleted file mode 100644 index e9ee039..0000000 --- metastore/src/gen-py/hive_metastore/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'ThriftHiveMetastore'] diff --git metastore/src/gen-py/hive_metastore/constants.py metastore/src/gen-py/hive_metastore/constants.py deleted file mode 100644 index 0f70b3a..0000000 --- metastore/src/gen-py/hive_metastore/constants.py +++ /dev/null @@ -1,41 +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 * - -DDL_TIME = "transient_lastDdlTime" - -IS_ARCHIVED = "is_archived" - -ORIGINAL_LOCATION = "original_location" - -META_TABLE_COLUMNS = "columns" - -META_TABLE_COLUMN_TYPES = "columns.types" - -BUCKET_FIELD_NAME = "bucket_field_name" - -BUCKET_COUNT = "bucket_count" - -FIELD_TO_DIMENSION = "field_to_dimension" - -META_TABLE_NAME = "name" - -META_TABLE_DB = "db" - -META_TABLE_LOCATION = "location" - -META_TABLE_SERDE = "serde" - -META_TABLE_PARTITION_COLUMNS = "partition_columns" - -FILE_INPUT_FORMAT = "file.inputformat" - -FILE_OUTPUT_FORMAT = "file.outputformat" - -META_TABLE_STORAGE = "storage_handler" - diff --git metastore/src/gen-py/hive_metastore/ttypes.py metastore/src/gen-py/hive_metastore/ttypes.py deleted file mode 100644 index 9e2479b..0000000 --- metastore/src/gen-py/hive_metastore/ttypes.py +++ /dev/null @@ -1,1854 +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 - - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class Version: - """ - Attributes: - - version - - comments - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'version', None, None, ), # 1 - (2, TType.STRING, 'comments', None, None, ), # 2 - ) - - def __init__(self, version=None, comments=None,): - self.version = version - self.comments = comments - - 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.version = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.comments = 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('Version') - if self.version != None: - oprot.writeFieldBegin('version', TType.STRING, 1) - oprot.writeString(self.version) - oprot.writeFieldEnd() - if self.comments != None: - oprot.writeFieldBegin('comments', TType.STRING, 2) - oprot.writeString(self.comments) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class FieldSchema: - """ - Attributes: - - name - - type - - comment - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'type', None, None, ), # 2 - (3, TType.STRING, 'comment', None, None, ), # 3 - ) - - def __init__(self, name=None, type=None, comment=None,): - self.name = name - self.type = type - self.comment = comment - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.type = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.comment = 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('FieldSchema') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.type != None: - oprot.writeFieldBegin('type', TType.STRING, 2) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.comment != None: - oprot.writeFieldBegin('comment', TType.STRING, 3) - oprot.writeString(self.comment) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Type: - """ - Attributes: - - name - - type1 - - type2 - - fields - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'type1', None, None, ), # 2 - (3, TType.STRING, 'type2', None, None, ), # 3 - (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4 - ) - - def __init__(self, name=None, type1=None, type2=None, fields=None,): - self.name = name - self.type1 = type1 - self.type2 = type2 - self.fields = fields - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.type1 = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.type2 = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.fields = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = FieldSchema() - _elem5.read(iprot) - self.fields.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Type') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.type1 != None: - oprot.writeFieldBegin('type1', TType.STRING, 2) - oprot.writeString(self.type1) - oprot.writeFieldEnd() - if self.type2 != None: - oprot.writeFieldBegin('type2', TType.STRING, 3) - oprot.writeString(self.type2) - oprot.writeFieldEnd() - if self.fields != None: - oprot.writeFieldBegin('fields', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.fields)) - for iter6 in self.fields: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Database: - """ - Attributes: - - name - - description - - locationUri - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'description', None, None, ), # 2 - (3, TType.STRING, 'locationUri', None, None, ), # 3 - ) - - def __init__(self, name=None, description=None, locationUri=None,): - self.name = name - self.description = description - self.locationUri = locationUri - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.description = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.locationUri = 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('Database') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.description != None: - oprot.writeFieldBegin('description', TType.STRING, 2) - oprot.writeString(self.description) - oprot.writeFieldEnd() - if self.locationUri != None: - oprot.writeFieldBegin('locationUri', TType.STRING, 3) - oprot.writeString(self.locationUri) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SerDeInfo: - """ - Attributes: - - name - - serializationLib - - parameters - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'serializationLib', None, None, ), # 2 - (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, name=None, serializationLib=None, parameters=None,): - self.name = name - self.serializationLib = serializationLib - self.parameters = parameters - - 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.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.serializationLib = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.parameters = {} - (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() - for _i11 in xrange(_size7): - _key12 = iprot.readString(); - _val13 = iprot.readString(); - self.parameters[_key12] = _val13 - iprot.readMapEnd() - 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('SerDeInfo') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.serializationLib != None: - oprot.writeFieldBegin('serializationLib', TType.STRING, 2) - oprot.writeString(self.serializationLib) - oprot.writeFieldEnd() - if self.parameters != None: - oprot.writeFieldBegin('parameters', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter14,viter15 in self.parameters.items(): - oprot.writeString(kiter14) - oprot.writeString(viter15) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Order: - """ - Attributes: - - col - - order - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'col', None, None, ), # 1 - (2, TType.I32, 'order', None, None, ), # 2 - ) - - def __init__(self, col=None, order=None,): - self.col = col - self.order = order - - 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.col = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.order = 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('Order') - if self.col != None: - oprot.writeFieldBegin('col', TType.STRING, 1) - oprot.writeString(self.col) - oprot.writeFieldEnd() - if self.order != None: - oprot.writeFieldBegin('order', TType.I32, 2) - oprot.writeI32(self.order) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class StorageDescriptor: - """ - Attributes: - - cols - - location - - inputFormat - - outputFormat - - compressed - - numBuckets - - serdeInfo - - bucketCols - - sortCols - - parameters - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 - (2, TType.STRING, 'location', None, None, ), # 2 - (3, TType.STRING, 'inputFormat', None, None, ), # 3 - (4, TType.STRING, 'outputFormat', None, None, ), # 4 - (5, TType.BOOL, 'compressed', None, None, ), # 5 - (6, TType.I32, 'numBuckets', None, None, ), # 6 - (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7 - (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8 - (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9 - (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10 - ) - - def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None,): - self.cols = cols - self.location = location - self.inputFormat = inputFormat - self.outputFormat = outputFormat - self.compressed = compressed - self.numBuckets = numBuckets - self.serdeInfo = serdeInfo - self.bucketCols = bucketCols - self.sortCols = sortCols - self.parameters = parameters - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.cols = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = FieldSchema() - _elem21.read(iprot) - self.cols.append(_elem21) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.location = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.inputFormat = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.outputFormat = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.compressed = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.numBuckets = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.serdeInfo = SerDeInfo() - self.serdeInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.LIST: - self.bucketCols = [] - (_etype25, _size22) = iprot.readListBegin() - for _i26 in xrange(_size22): - _elem27 = iprot.readString(); - self.bucketCols.append(_elem27) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.LIST: - self.sortCols = [] - (_etype31, _size28) = iprot.readListBegin() - for _i32 in xrange(_size28): - _elem33 = Order() - _elem33.read(iprot) - self.sortCols.append(_elem33) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.MAP: - self.parameters = {} - (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() - for _i38 in xrange(_size34): - _key39 = iprot.readString(); - _val40 = iprot.readString(); - self.parameters[_key39] = _val40 - iprot.readMapEnd() - 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('StorageDescriptor') - if self.cols != None: - oprot.writeFieldBegin('cols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.cols)) - for iter41 in self.cols: - iter41.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.location != None: - oprot.writeFieldBegin('location', TType.STRING, 2) - oprot.writeString(self.location) - oprot.writeFieldEnd() - if self.inputFormat != None: - oprot.writeFieldBegin('inputFormat', TType.STRING, 3) - oprot.writeString(self.inputFormat) - oprot.writeFieldEnd() - if self.outputFormat != None: - oprot.writeFieldBegin('outputFormat', TType.STRING, 4) - oprot.writeString(self.outputFormat) - oprot.writeFieldEnd() - if self.compressed != None: - oprot.writeFieldBegin('compressed', TType.BOOL, 5) - oprot.writeBool(self.compressed) - oprot.writeFieldEnd() - if self.numBuckets != None: - oprot.writeFieldBegin('numBuckets', TType.I32, 6) - oprot.writeI32(self.numBuckets) - oprot.writeFieldEnd() - if self.serdeInfo != None: - oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7) - self.serdeInfo.write(oprot) - oprot.writeFieldEnd() - if self.bucketCols != None: - oprot.writeFieldBegin('bucketCols', TType.LIST, 8) - oprot.writeListBegin(TType.STRING, len(self.bucketCols)) - for iter42 in self.bucketCols: - oprot.writeString(iter42) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.sortCols != None: - oprot.writeFieldBegin('sortCols', TType.LIST, 9) - oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) - for iter43 in self.sortCols: - iter43.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.parameters != None: - oprot.writeFieldBegin('parameters', TType.MAP, 10) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter44,viter45 in self.parameters.items(): - oprot.writeString(kiter44) - oprot.writeString(viter45) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Table: - """ - Attributes: - - tableName - - dbName - - owner - - createTime - - lastAccessTime - - retention - - sd - - partitionKeys - - parameters - - viewOriginalText - - viewExpandedText - - tableType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'owner', None, None, ), # 3 - (4, TType.I32, 'createTime', None, None, ), # 4 - (5, TType.I32, 'lastAccessTime', None, None, ), # 5 - (6, TType.I32, 'retention', None, None, ), # 6 - (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7 - (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8 - (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 - (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 - (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 - (12, TType.STRING, 'tableType', None, None, ), # 12 - ) - - def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None,): - self.tableName = tableName - self.dbName = dbName - self.owner = owner - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.retention = retention - self.sd = sd - self.partitionKeys = partitionKeys - self.parameters = parameters - self.viewOriginalText = viewOriginalText - self.viewExpandedText = viewExpandedText - self.tableType = tableType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.owner = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.createTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.retention = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.LIST: - self.partitionKeys = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in xrange(_size46): - _elem51 = FieldSchema() - _elem51.read(iprot) - self.partitionKeys.append(_elem51) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.parameters = {} - (_ktype53, _vtype54, _size52 ) = iprot.readMapBegin() - for _i56 in xrange(_size52): - _key57 = iprot.readString(); - _val58 = iprot.readString(); - self.parameters[_key57] = _val58 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRING: - self.viewOriginalText = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRING: - self.viewExpandedText = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.STRING: - self.tableType = 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('Table') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.dbName != None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.owner != None: - oprot.writeFieldBegin('owner', TType.STRING, 3) - oprot.writeString(self.owner) - oprot.writeFieldEnd() - if self.createTime != None: - oprot.writeFieldBegin('createTime', TType.I32, 4) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime != None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.retention != None: - oprot.writeFieldBegin('retention', TType.I32, 6) - oprot.writeI32(self.retention) - oprot.writeFieldEnd() - if self.sd != None: - oprot.writeFieldBegin('sd', TType.STRUCT, 7) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.partitionKeys != None: - oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) - oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) - for iter59 in self.partitionKeys: - iter59.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.parameters != None: - oprot.writeFieldBegin('parameters', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter60,viter61 in self.parameters.items(): - oprot.writeString(kiter60) - oprot.writeString(viter61) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.viewOriginalText != None: - oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10) - oprot.writeString(self.viewOriginalText) - oprot.writeFieldEnd() - if self.viewExpandedText != None: - oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11) - oprot.writeString(self.viewExpandedText) - oprot.writeFieldEnd() - if self.tableType != None: - oprot.writeFieldBegin('tableType', TType.STRING, 12) - oprot.writeString(self.tableType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Partition: - """ - Attributes: - - values - - dbName - - tableName - - createTime - - lastAccessTime - - sd - - parameters - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'tableName', None, None, ), # 3 - (4, TType.I32, 'createTime', None, None, ), # 4 - (5, TType.I32, 'lastAccessTime', None, None, ), # 5 - (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6 - (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7 - ) - - def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None,): - self.values = values - self.dbName = dbName - self.tableName = tableName - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.sd = sd - self.parameters = parameters - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.values = [] - (_etype65, _size62) = iprot.readListBegin() - for _i66 in xrange(_size62): - _elem67 = iprot.readString(); - self.values.append(_elem67) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.createTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.MAP: - self.parameters = {} - (_ktype69, _vtype70, _size68 ) = iprot.readMapBegin() - for _i72 in xrange(_size68): - _key73 = iprot.readString(); - _val74 = iprot.readString(); - self.parameters[_key73] = _val74 - iprot.readMapEnd() - 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('Partition') - if self.values != None: - oprot.writeFieldBegin('values', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.values)) - for iter75 in self.values: - oprot.writeString(iter75) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dbName != None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 3) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.createTime != None: - oprot.writeFieldBegin('createTime', TType.I32, 4) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime != None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.sd != None: - oprot.writeFieldBegin('sd', TType.STRUCT, 6) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.parameters != None: - oprot.writeFieldBegin('parameters', TType.MAP, 7) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter76,viter77 in self.parameters.items(): - oprot.writeString(kiter76) - oprot.writeString(viter77) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Index: - """ - Attributes: - - indexName - - indexHandlerClass - - dbName - - origTableName - - createTime - - lastAccessTime - - indexTableName - - sd - - parameters - - deferredRebuild - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'indexName', None, None, ), # 1 - (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2 - (3, TType.STRING, 'dbName', None, None, ), # 3 - (4, TType.STRING, 'origTableName', None, None, ), # 4 - (5, TType.I32, 'createTime', None, None, ), # 5 - (6, TType.I32, 'lastAccessTime', None, None, ), # 6 - (7, TType.STRING, 'indexTableName', None, None, ), # 7 - (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8 - (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 - (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10 - ) - - def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,): - self.indexName = indexName - self.indexHandlerClass = indexHandlerClass - self.dbName = dbName - self.origTableName = origTableName - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.indexTableName = indexTableName - self.sd = sd - self.parameters = parameters - self.deferredRebuild = deferredRebuild - - 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.indexName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.indexHandlerClass = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.dbName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.origTableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.createTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.indexTableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.parameters = {} - (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin() - for _i82 in xrange(_size78): - _key83 = iprot.readString(); - _val84 = iprot.readString(); - self.parameters[_key83] = _val84 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.BOOL: - self.deferredRebuild = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Index') - if self.indexName != None: - oprot.writeFieldBegin('indexName', TType.STRING, 1) - oprot.writeString(self.indexName) - oprot.writeFieldEnd() - if self.indexHandlerClass != None: - oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2) - oprot.writeString(self.indexHandlerClass) - oprot.writeFieldEnd() - if self.dbName != None: - oprot.writeFieldBegin('dbName', TType.STRING, 3) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.origTableName != None: - oprot.writeFieldBegin('origTableName', TType.STRING, 4) - oprot.writeString(self.origTableName) - oprot.writeFieldEnd() - if self.createTime != None: - oprot.writeFieldBegin('createTime', TType.I32, 5) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime != None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 6) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.indexTableName != None: - oprot.writeFieldBegin('indexTableName', TType.STRING, 7) - oprot.writeString(self.indexTableName) - oprot.writeFieldEnd() - if self.sd != None: - oprot.writeFieldBegin('sd', TType.STRUCT, 8) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.parameters != None: - oprot.writeFieldBegin('parameters', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter85,viter86 in self.parameters.items(): - oprot.writeString(kiter85) - oprot.writeString(viter86) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.deferredRebuild != None: - oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10) - oprot.writeBool(self.deferredRebuild) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Schema: - """ - Attributes: - - fieldSchemas - - properties - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 - (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2 - ) - - def __init__(self, fieldSchemas=None, properties=None,): - self.fieldSchemas = fieldSchemas - self.properties = properties - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fieldSchemas = [] - (_etype90, _size87) = iprot.readListBegin() - for _i91 in xrange(_size87): - _elem92 = FieldSchema() - _elem92.read(iprot) - self.fieldSchemas.append(_elem92) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.MAP: - self.properties = {} - (_ktype94, _vtype95, _size93 ) = iprot.readMapBegin() - for _i97 in xrange(_size93): - _key98 = iprot.readString(); - _val99 = iprot.readString(); - self.properties[_key98] = _val99 - iprot.readMapEnd() - 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('Schema') - if self.fieldSchemas != None: - oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) - for iter100 in self.fieldSchemas: - iter100.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.properties != None: - oprot.writeFieldBegin('properties', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter101,viter102 in self.properties.items(): - oprot.writeString(kiter101) - oprot.writeString(viter102) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class MetaException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('MetaException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnknownTableException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnknownTableException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnknownDBException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnknownDBException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AlreadyExistsException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AlreadyExistsException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidObjectException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidObjectException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NoSuchObjectException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NoSuchObjectException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class IndexAlreadyExistsException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('IndexAlreadyExistsException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidOperationException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidOperationException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ConfigValSecurityException(Exception): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ConfigValSecurityException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp new file mode 100644 index 0000000..be70105 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -0,0 +1,12892 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "ThriftHiveMetastore.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +uint32_t ThriftHiveMetastore_create_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->database.read(iprot); + this->__isset.database = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->database.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 += (*(this->database)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_database_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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_database_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_database_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_database_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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->deleteData))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_databases_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->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->pattern); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->pattern))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_databases_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 _size90; + ::apache::thrift::protocol::TType _etype93; + iprot->readListBegin(_etype93, _size90); + this->success.resize(_size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) + { + xfer += iprot->readString(this->success[_i94]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter95; + for (_iter95 = this->success.begin(); _iter95 != this->success.end(); ++_iter95) + { + xfer += oprot->writeString((*_iter95)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_databases_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 _size96; + ::apache::thrift::protocol::TType _etype99; + iprot->readListBegin(_etype99, _size96); + (*(this->success)).resize(_size96); + uint32_t _i100; + for (_i100 = 0; _i100 < _size96; ++_i100) + { + xfer += iprot->readString((*(this->success))[_i100]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_databases_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 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(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size101; + ::apache::thrift::protocol::TType _etype104; + iprot->readListBegin(_etype104, _size101); + this->success.resize(_size101); + uint32_t _i105; + for (_i105 = 0; _i105 < _size101; ++_i105) + { + xfer += iprot->readString(this->success[_i105]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter106; + for (_iter106 = this->success.begin(); _iter106 != this->success.end(); ++_iter106) + { + xfer += oprot->writeString((*_iter106)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_databases_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 _size107; + ::apache::thrift::protocol::TType _etype110; + iprot->readListBegin(_etype110, _size107); + (*(this->success)).resize(_size107); + uint32_t _i111; + for (_i111 = 0; _i111 < _size107; ++_i111) + { + xfer += iprot->readString((*(this->success))[_i111]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->type.read(iprot); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->type.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 += (*(this->type)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_type_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->type); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_all_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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size112; + ::apache::thrift::protocol::TType _ktype113; + ::apache::thrift::protocol::TType _vtype114; + iprot->readMapBegin(_ktype113, _vtype114, _size112); + uint32_t _i116; + for (_i116 = 0; _i116 < _size112; ++_i116) + { + std::string _key117; + xfer += iprot->readString(_key117); + Type& _val118 = this->success[_key117]; + xfer += _val118.read(iprot); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->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) + { + xfer += oprot->writeString(_iter119->first); + xfer += _iter119->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size120; + ::apache::thrift::protocol::TType _ktype121; + ::apache::thrift::protocol::TType _vtype122; + iprot->readMapBegin(_ktype121, _vtype122, _size120); + uint32_t _i124; + for (_i124 = 0; _i124 < _size120; ++_i124) + { + std::string _key125; + xfer += iprot->readString(_key125); + Type& _val126 = (*(this->success))[_key125]; + xfer += _val126.read(iprot); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_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 _size127; + ::apache::thrift::protocol::TType _etype130; + iprot->readListBegin(_etype130, _size127); + this->success.resize(_size127); + uint32_t _i131; + for (_i131 = 0; _i131 < _size127; ++_i131) + { + xfer += this->success[_i131].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter132; + for (_iter132 = this->success.begin(); _iter132 != this->success.end(); ++_iter132) + { + xfer += (*_iter132).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_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 _size133; + ::apache::thrift::protocol::TType _etype136; + iprot->readListBegin(_etype136, _size133); + (*(this->success)).resize(_size133); + uint32_t _i137; + for (_i137 = 0; _i137 < _size133; ++_i137) + { + xfer += (*(this->success))[_i137].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_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 _size138; + ::apache::thrift::protocol::TType _etype141; + iprot->readListBegin(_etype141, _size138); + this->success.resize(_size138); + uint32_t _i142; + for (_i142 = 0; _i142 < _size138; ++_i142) + { + xfer += this->success[_i142].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter143; + for (_iter143 = this->success.begin(); _iter143 != this->success.end(); ++_iter143) + { + xfer += (*_iter143).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_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 _size144; + ::apache::thrift::protocol::TType _etype147; + iprot->readListBegin(_etype147, _size144); + (*(this->success)).resize(_size144); + uint32_t _i148; + for (_i148 = 0; _i148 < _size144; ++_i148) + { + xfer += (*(this->success))[_i148].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tbl.read(iprot); + this->__isset.tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->tbl.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 += (*(this->tbl)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_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->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + 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->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->dbname))); + xfer += oprot->writeFieldEnd(); + 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->writeBool((*(this->deleteData))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->pattern); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->pattern))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_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 _size149; + ::apache::thrift::protocol::TType _etype152; + iprot->readListBegin(_etype152, _size149); + this->success.resize(_size149); + uint32_t _i153; + for (_i153 = 0; _i153 < _size149; ++_i153) + { + xfer += iprot->readString(this->success[_i153]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter154; + for (_iter154 = this->success.begin(); _iter154 != this->success.end(); ++_iter154) + { + xfer += oprot->writeString((*_iter154)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_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 _size155; + ::apache::thrift::protocol::TType _etype158; + iprot->readListBegin(_etype158, _size155); + (*(this->success)).resize(_size155); + uint32_t _i159; + for (_i159 = 0; _i159 < _size155; ++_i159) + { + xfer += iprot->readString((*(this->success))[_i159]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_tables_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size160; + ::apache::thrift::protocol::TType _etype163; + iprot->readListBegin(_etype163, _size160); + this->success.resize(_size160); + uint32_t _i164; + for (_i164 = 0; _i164 < _size160; ++_i164) + { + xfer += iprot->readString(this->success[_i164]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter165; + for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165) + { + xfer += oprot->writeString((*_iter165)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_tables_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 _size166; + ::apache::thrift::protocol::TType _etype169; + iprot->readListBegin(_etype169, _size166); + (*(this->success)).resize(_size166); + uint32_t _i170; + for (_i170 = 0; _i170 < _size166; ++_i170) + { + xfer += iprot->readString((*(this->success))[_i170]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_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->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->dbname))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_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->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_tbl.read(iprot); + this->__isset.new_tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->new_tbl.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->dbname))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->new_tbl)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->new_part.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 += (*(this->new_part)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size171; + ::apache::thrift::protocol::TType _etype174; + iprot->readListBegin(_etype174, _size171); + this->part_vals.resize(_size171); + uint32_t _i175; + for (_i175 = 0; _i175 < _size171; ++_i175) + { + xfer += iprot->readString(this->part_vals[_i175]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter176)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter177)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; + 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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size178; + ::apache::thrift::protocol::TType _etype181; + iprot->readListBegin(_etype181, _size178); + this->part_vals.resize(_size178); + uint32_t _i182; + for (_i182 = 0; _i182 < _size178; ++_i182) + { + xfer += iprot->readString(this->part_vals[_i182]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter183)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter184)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->deleteData))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_by_name_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->deleteData))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size185; + ::apache::thrift::protocol::TType _etype188; + iprot->readListBegin(_etype188, _size185); + this->part_vals.resize(_size185); + uint32_t _i189; + for (_i189 = 0; _i189 < _size185; ++_i189) + { + xfer += iprot->readString(this->part_vals[_i189]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter190)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter191)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; + 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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_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 _size192; + ::apache::thrift::protocol::TType _etype195; + iprot->readListBegin(_etype195, _size192); + this->success.resize(_size192); + uint32_t _i196; + for (_i196 = 0; _i196 < _size192; ++_i196) + { + xfer += this->success[_i196].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter197; + for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) + { + xfer += (*_iter197).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_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 _size198; + ::apache::thrift::protocol::TType _etype201; + iprot->readListBegin(_etype201, _size198); + (*(this->success)).resize(_size198); + uint32_t _i202; + for (_i202 = 0; _i202 < _size198; ++_i202) + { + xfer += (*(this->success))[_i202].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; + 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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size203; + ::apache::thrift::protocol::TType _etype206; + iprot->readListBegin(_etype206, _size203); + this->success.resize(_size203); + uint32_t _i207; + for (_i207 = 0; _i207 < _size203; ++_i207) + { + xfer += iprot->readString(this->success[_i207]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter208; + for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) + { + xfer += oprot->writeString((*_iter208)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size209; + ::apache::thrift::protocol::TType _etype212; + iprot->readListBegin(_etype212, _size209); + (*(this->success)).resize(_size209); + uint32_t _i213; + for (_i213 = 0; _i213 < _size209; ++_i213) + { + xfer += iprot->readString((*(this->success))[_i213]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_ps_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size214; + ::apache::thrift::protocol::TType _etype217; + iprot->readListBegin(_etype217, _size214); + this->part_vals.resize(_size214); + uint32_t _i218; + for (_i218 = 0; _i218 < _size214; ++_i218) + { + xfer += iprot->readString(this->part_vals[_i218]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter219)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter220)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size221; + ::apache::thrift::protocol::TType _etype224; + iprot->readListBegin(_etype224, _size221); + this->success.resize(_size221); + uint32_t _i225; + for (_i225 = 0; _i225 < _size221; ++_i225) + { + xfer += this->success[_i225].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter226; + for (_iter226 = this->success.begin(); _iter226 != this->success.end(); ++_iter226) + { + xfer += (*_iter226).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size227; + ::apache::thrift::protocol::TType _etype230; + iprot->readListBegin(_etype230, _size227); + (*(this->success)).resize(_size227); + uint32_t _i231; + for (_i231 = 0; _i231 < _size227; ++_i231) + { + xfer += (*(this->success))[_i231].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_ps_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size232; + ::apache::thrift::protocol::TType _etype235; + iprot->readListBegin(_etype235, _size232); + this->part_vals.resize(_size232); + uint32_t _i236; + for (_i236 = 0; _i236 < _size232; ++_i236) + { + xfer += iprot->readString(this->part_vals[_i236]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter237)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + 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) + { + xfer += oprot->writeString((*_iter238)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size239; + ::apache::thrift::protocol::TType _etype242; + iprot->readListBegin(_etype242, _size239); + this->success.resize(_size239); + uint32_t _i243; + for (_i243 = 0; _i243 < _size239; ++_i243) + { + xfer += iprot->readString(this->success[_i243]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter244; + for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244) + { + xfer += oprot->writeString((*_iter244)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_ps_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 _size245; + ::apache::thrift::protocol::TType _etype248; + iprot->readListBegin(_etype248, _size245); + (*(this->success)).resize(_size245); + uint32_t _i249; + for (_i249 = 0; _i249 < _size245; ++_i249) + { + xfer += iprot->readString((*(this->success))[_i249]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("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->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("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->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size250; + ::apache::thrift::protocol::TType _etype253; + iprot->readListBegin(_etype253, _size250); + this->success.resize(_size250); + uint32_t _i254; + for (_i254 = 0; _i254 < _size250; ++_i254) + { + xfer += this->success[_i254].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter255; + for (_iter255 = this->success.begin(); _iter255 != this->success.end(); ++_iter255) + { + xfer += (*_iter255).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size256; + ::apache::thrift::protocol::TType _etype259; + iprot->readListBegin(_etype259, _size256); + (*(this->success)).resize(_size256); + uint32_t _i260; + for (_i260 = 0; _i260 < _size256; ++_i260) + { + xfer += (*(this->success))[_i260].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->new_part.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->new_part)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_config_value_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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultValue); + this->__isset.defaultValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->defaultValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->defaultValue))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_vals_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->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size261; + ::apache::thrift::protocol::TType _etype264; + iprot->readListBegin(_etype264, _size261); + this->success.resize(_size261); + uint32_t _i265; + for (_i265 = 0; _i265 < _size261; ++_i265) + { + xfer += iprot->readString(this->success[_i265]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter266; + for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266) + { + xfer += oprot->writeString((*_iter266)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_vals_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 _size267; + ::apache::thrift::protocol::TType _etype270; + iprot->readListBegin(_etype270, _size267); + (*(this->success)).resize(_size267); + uint32_t _i271; + for (_i271 = 0; _i271 < _size267; ++_i271) + { + xfer += iprot->readString((*(this->success))[_i271]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_spec_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->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size272; + ::apache::thrift::protocol::TType _ktype273; + ::apache::thrift::protocol::TType _vtype274; + iprot->readMapBegin(_ktype273, _vtype274, _size272); + uint32_t _i276; + for (_i276 = 0; _i276 < _size272; ++_i276) + { + std::string _key277; + xfer += iprot->readString(_key277); + std::string& _val278 = this->success[_key277]; + xfer += iprot->readString(_val278); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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->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) + { + xfer += oprot->writeString(_iter279->first); + xfer += oprot->writeString(_iter279->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size280; + ::apache::thrift::protocol::TType _ktype281; + ::apache::thrift::protocol::TType _vtype282; + iprot->readMapBegin(_ktype281, _vtype282, _size280); + uint32_t _i284; + for (_i284 = 0; _i284 < _size280; ++_i284) + { + std::string _key285; + xfer += iprot->readString(_key285); + std::string& _val286 = (*(this->success))[_key285]; + xfer += iprot->readString(_val286); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_index.read(iprot); + this->__isset.new_index = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->index_table.read(iprot); + this->__isset.index_table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->new_index.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->index_table.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 += (*(this->new_index)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->index_table)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_index_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_index_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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_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->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->base_tbl_name); + this->__isset.base_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->idx_name); + this->__isset.idx_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_idx.read(iprot); + this->__isset.new_idx = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->base_tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->idx_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->new_idx.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbname))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->base_tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->idx_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->new_idx)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_index_by_name_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("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->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("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->writeBool((*(this->deleteData))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_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->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->index_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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 += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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 _size287; + ::apache::thrift::protocol::TType _etype290; + iprot->readListBegin(_etype290, _size287); + this->success.resize(_size287); + uint32_t _i291; + for (_i291 = 0; _i291 < _size287; ++_i291) + { + xfer += this->success[_i291].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter292; + for (_iter292 = this->success.begin(); _iter292 != this->success.end(); ++_iter292) + { + xfer += (*_iter292).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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 _size293; + ::apache::thrift::protocol::TType _etype296; + iprot->readListBegin(_etype296, _size293); + (*(this->success)).resize(_size293); + uint32_t _i297; + for (_i297 = 0; _i297 < _size293; ++_i297) + { + xfer += (*(this->success))[_i297].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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; + 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->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size298; + ::apache::thrift::protocol::TType _etype301; + iprot->readListBegin(_etype301, _size298); + this->success.resize(_size298); + uint32_t _i302; + for (_i302 = 0; _i302 < _size298; ++_i302) + { + xfer += iprot->readString(this->success[_i302]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter303; + for (_iter303 = this->success.begin(); _iter303 != this->success.end(); ++_iter303) + { + xfer += oprot->writeString((*_iter303)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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; + 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 _size304; + ::apache::thrift::protocol::TType _etype307; + iprot->readListBegin(_etype307, _size304); + (*(this->success)).resize(_size304); + uint32_t _i308; + for (_i308 = 0; _i308 < _size304; ++_i308) + { + xfer += iprot->readString((*(this->success))[_i308]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ + send_create_database(database); + recv_create_database(); +} + +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_create_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +{ + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) +{ + send_drop_database(name, deleteData); + recv_drop_database(); +} + +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); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + 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_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +{ + send_get_type(name); + recv_get_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_type(const Type& type) +{ + send_create_type(type); + return recv_create_type(); +} + +void ThriftHiveMetastoreClient::send_create_type(const Type& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_create_type() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +{ + send_drop_type(type); + return recv_drop_type(); +} + +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_type() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_get_type_all(name); + recv_get_type_all(_return); +} + +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); + + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type_all") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_all_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.o2) { + throw result.o2; + } + 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) +{ + send_get_fields(db_name, table_name); + recv_get_fields(_return); +} + +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); + + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_fields(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("get_fields") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_fields_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + 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) +{ + send_get_schema(db_name, table_name); + recv_get_schema(_return); +} + +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); + + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_schema(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("get_schema") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_schema_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_table(const Table& tbl) +{ + send_create_table(tbl); + recv_create_table(); +} + +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_create_table() +{ + + 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("create_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + send_drop_table(dbname, name, deleteData); + recv_drop_table(); +} + +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); + + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_table() +{ + + 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("drop_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +{ + send_get_tables(db_name, pattern); + recv_get_tables(_return); +} + +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); + + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_tables(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("get_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +{ + send_get_all_tables(db_name); + recv_get_all_tables(_return); +} + +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); + + ThriftHiveMetastore_get_all_tables_pargs args; + args.db_name = &db_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_tables(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("get_all_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +{ + send_get_table(dbname, tbl_name); + recv_get_table(_return); +} + +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); + + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_table(Table& _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("get_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_table_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); +} + +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); + + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_table() +{ + + 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("alter_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +{ + send_add_partition(new_part); + recv_add_partition(_return); +} + +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _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("add_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_add_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + 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) +{ + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); +} + +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); + + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _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("append_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + 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) +{ + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _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("append_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + 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) +{ + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); +} + +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); + + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition() +{ + + 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("drop_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); +} + +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); + + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +{ + + 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("drop_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_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) +{ + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); +} + +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); + + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _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("get_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); +} + +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); + + ThriftHiveMetastore_get_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _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("get_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_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); + + ThriftHiveMetastore_get_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions(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("get_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions 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) +{ + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); +} + +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); + + ThriftHiveMetastore_get_partition_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_names(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("get_partition_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_names_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.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +{ + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); +} + +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); + + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_ps(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("get_partitions_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partitions_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_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) +{ + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); +} + +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); + + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(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("get_partition_names_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_names_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +{ + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(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("get_partitions_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partitions_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); +} + +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_partition() +{ + + 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("alter_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +{ + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); +} + +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); + + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_config_value(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("get_config_value") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_config_value_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); +} + +void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +{ + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); +} + +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); + + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(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("partition_name_to_vals") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_partition_name_to_vals_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); +} + +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +{ + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); +} + +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("partition_name_to_spec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_partition_name_to_spec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); +} + +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +{ + send_add_index(new_index, index_table); + recv_add_index(_return); +} + +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_add_index(Index& _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("add_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_add_index_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); +} + +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_index() +{ + + 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("alter_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_index_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); +} + +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +{ + + 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("drop_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_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) +{ + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); +} + +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); + + ThriftHiveMetastore_get_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _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("get_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); +} + +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); + + ThriftHiveMetastore_get_indexes_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_indexes(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("get_indexes") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_indexes_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + 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) +{ + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); +} + +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); + + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_index_names(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("get_index_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_index_names_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.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); +} + +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(); + 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 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); + } + (this->*(pfn->second))(seqid, iprot, oprot); + return true; +} + +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); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_type_result result; + try { + iface_->get_type(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_create_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_type_result result; + try { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_drop_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_type_result result; + try { + result.success = iface_->drop_type(args.type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_type_all_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_type_all_result result; + try { + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_schema_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_schema_result result; + try { + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_create_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_table_result result; + try { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_drop_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_table_result result; + try { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_tables_result result; + try { + iface_->get_tables(result.success, args.db_name, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_all_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_all_tables_result result; + try { + iface_->get_all_tables(result.success, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_table_result result; + try { + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_alter_table_result result; + try { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_add_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_add_partition_result result; + try { + iface_->add_partition(result.success, args.new_part); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_append_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_append_partition_result result; + try { + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_append_partition_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_append_partition_by_name_result result; + try { + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_drop_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_partition_result result; + try { + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_drop_partition_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_partition_by_name_result result; + try { + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partition_result result; + try { + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partition_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partition_by_name_result result; + try { + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partitions_result result; + try { + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partition_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partition_names_result result; + try { + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o2) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partitions_ps_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partitions_ps_result result; + try { + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partition_names_ps_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partition_names_ps_result result; + try { + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_partitions_by_filter_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_partitions_by_filter_result result; + try { + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_alter_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_alter_partition_result result; + try { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_config_value_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_config_value_result result; + try { + iface_->get_config_value(result.success, args.name, args.defaultValue); + result.__isset.success = true; + } catch (ConfigValSecurityException &o1) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_partition_name_to_vals_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_partition_name_to_vals_result result; + try { + iface_->partition_name_to_vals(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_partition_name_to_spec_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_partition_name_to_spec_result result; + try { + iface_->partition_name_to_spec(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_add_index_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_add_index_result result; + try { + iface_->add_index(result.success, args.new_index, args.index_table); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_alter_index_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_alter_index_result result; + try { + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("alter_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) +{ + ThriftHiveMetastore_drop_index_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_index_by_name_result result; + try { + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_index_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_index_by_name_result result; + try { + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::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(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_indexes_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_indexes_result result; + try { + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + 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) +{ + ThriftHiveMetastore_get_index_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_index_names_result result; + try { + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (MetaException &o2) { + 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); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +}}} // namespace + diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h new file mode 100644 index 0000000..fb509f8 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -0,0 +1,5430 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef ThriftHiveMetastore_H +#define ThriftHiveMetastore_H + +#include +#include "hive_metastore_types.h" +#include "FacebookService.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf { + public: + virtual ~ThriftHiveMetastoreIf() {} + virtual void create_database(const Database& database) = 0; + virtual void get_database(Database& _return, const std::string& name) = 0; + virtual void drop_database(const std::string& name, const bool deleteData) = 0; + virtual void get_databases(std::vector & _return, const std::string& pattern) = 0; + virtual void get_all_databases(std::vector & _return) = 0; + virtual void get_type(Type& _return, const std::string& name) = 0; + virtual bool create_type(const Type& type) = 0; + virtual bool drop_type(const std::string& type) = 0; + virtual void get_type_all(std::map & _return, const std::string& name) = 0; + virtual void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; + virtual void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; + virtual void create_table(const Table& tbl) = 0; + virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0; + virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0; + virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; + virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; + virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0; + virtual void add_partition(Partition& _return, const Partition& new_part) = 0; + virtual void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; + virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; + virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; + virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; + virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; + virtual void 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) = 0; + virtual void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) = 0; + virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; + virtual void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) = 0; + virtual void partition_name_to_vals(std::vector & _return, const std::string& part_name) = 0; + virtual void partition_name_to_spec(std::map & _return, const std::string& part_name) = 0; + virtual void add_index(Index& _return, const Index& new_index, const Table& index_table) = 0; + virtual void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) = 0; + virtual bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) = 0; + virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; + virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; +}; + +class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { + public: + virtual ~ThriftHiveMetastoreNull() {} + void create_database(const Database& /* database */) { + return; + } + void get_database(Database& /* _return */, const std::string& /* name */) { + return; + } + void drop_database(const std::string& /* name */, const bool /* deleteData */) { + return; + } + void get_databases(std::vector & /* _return */, const std::string& /* pattern */) { + return; + } + void get_all_databases(std::vector & /* _return */) { + return; + } + void get_type(Type& /* _return */, const std::string& /* name */) { + return; + } + bool create_type(const Type& /* type */) { + bool _return = false; + return _return; + } + bool drop_type(const std::string& /* type */) { + bool _return = false; + return _return; + } + void get_type_all(std::map & /* _return */, const std::string& /* name */) { + return; + } + void get_fields(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void get_schema(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void create_table(const Table& /* tbl */) { + return; + } + void drop_table(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */) { + return; + } + void get_tables(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) { + return; + } + void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { + return; + } + void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { + return; + } + void alter_table(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */) { + return; + } + void add_partition(Partition& /* _return */, const Partition& /* new_part */) { + return; + } + void append_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { + return; + } + void append_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { + return; + } + bool drop_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + bool drop_partition_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { + return; + } + void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { + return; + } + void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { + return; + } + void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { + return; + } + void get_partitions_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { + return; + } + void 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 */) { + return; + } + void get_partitions_by_filter(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */, const int16_t /* max_parts */) { + return; + } + void alter_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */) { + return; + } + void get_config_value(std::string& /* _return */, const std::string& /* name */, const std::string& /* defaultValue */) { + return; + } + void partition_name_to_vals(std::vector & /* _return */, const std::string& /* part_name */) { + return; + } + void partition_name_to_spec(std::map & /* _return */, const std::string& /* part_name */) { + return; + } + void add_index(Index& /* _return */, const Index& /* new_index */, const Table& /* index_table */) { + return; + } + void alter_index(const std::string& /* dbname */, const std::string& /* base_tbl_name */, const std::string& /* idx_name */, const Index& /* new_idx */) { + return; + } + bool drop_index_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + void get_index_by_name(Index& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */) { + return; + } + void get_indexes(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { + return; + } + void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { + return; + } +}; + +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: + + ThriftHiveMetastore_create_database_args() { + } + + virtual ~ThriftHiveMetastore_create_database_args() throw() {} + + Database database; + + _ThriftHiveMetastore_create_database_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const + { + if (!(database == rhs.database)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_database_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_create_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_database_pargs() throw() {} + + const Database* database; + + 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: + + ThriftHiveMetastore_create_database_result() { + } + + virtual ~ThriftHiveMetastore_create_database_result() throw() {} + + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_database_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_create_database_presult() throw() {} + + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_database_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_database_args() : name("") { + } + + virtual ~ThriftHiveMetastore_get_database_args() throw() {} + + std::string name; + + _ThriftHiveMetastore_get_database_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_database_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_database_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_database_pargs() throw() {} + + const std::string* name; + + 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: + + ThriftHiveMetastore_get_database_result() { + } + + virtual ~ThriftHiveMetastore_get_database_result() throw() {} + + Database success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_database_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_database_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_database_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_database_presult() throw() {} + + Database* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_database_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_database_args() throw() {} + + std::string name; + bool deleteData; + + _ThriftHiveMetastore_drop_database_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_database_pargs() throw() {} + + const std::string* name; + const bool* deleteData; + + 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: + + ThriftHiveMetastore_drop_database_result() { + } + + virtual ~ThriftHiveMetastore_drop_database_result() throw() {} + + NoSuchObjectException o1; + InvalidOperationException o2; + MetaException o3; + + _ThriftHiveMetastore_drop_database_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_database_presult() throw() {} + + NoSuchObjectException o1; + InvalidOperationException o2; + MetaException o3; + + _ThriftHiveMetastore_drop_database_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_databases_args() : pattern("") { + } + + virtual ~ThriftHiveMetastore_get_databases_args() throw() {} + + std::string pattern; + + _ThriftHiveMetastore_get_databases_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const + { + if (!(pattern == rhs.pattern)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_databases_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_databases_pargs() throw() {} + + const std::string* pattern; + + 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: + + ThriftHiveMetastore_get_databases_result() { + } + + virtual ~ThriftHiveMetastore_get_databases_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_databases_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_databases_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_databases_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_databases_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_databases_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_all_databases_args { + public: + + ThriftHiveMetastore_get_all_databases_args() { + } + + virtual ~ThriftHiveMetastore_get_all_databases_args() throw() {} + + + bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_all_databases_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw() {} + + + 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: + + ThriftHiveMetastore_get_all_databases_result() { + } + + virtual ~ThriftHiveMetastore_get_all_databases_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_all_databases_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_all_databases_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_all_databases_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_type_args() : name("") { + } + + virtual ~ThriftHiveMetastore_get_type_args() throw() {} + + std::string name; + + _ThriftHiveMetastore_get_type_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_type_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_type_pargs() throw() {} + + const std::string* name; + + 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: + + ThriftHiveMetastore_get_type_result() { + } + + virtual ~ThriftHiveMetastore_get_type_result() throw() {} + + Type success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_type_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_type_presult() throw() {} + + Type* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_type_presult__isset __isset; + + 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: + + ThriftHiveMetastore_create_type_args() { + } + + virtual ~ThriftHiveMetastore_create_type_args() throw() {} + + Type type; + + _ThriftHiveMetastore_create_type_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_type_args & rhs) const + { + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_type_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_create_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_type_pargs() throw() {} + + const Type* type; + + 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: + + ThriftHiveMetastore_create_type_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_type_result() throw() {} + + bool success; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_type_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_type_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_create_type_presult() throw() {} + + bool* success; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_type_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_type_args() : type("") { + } + + virtual ~ThriftHiveMetastore_drop_type_args() throw() {} + + std::string type; + + _ThriftHiveMetastore_drop_type_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_type_args & rhs) const + { + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_type_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_type_pargs() throw() {} + + const std::string* type; + + 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: + + ThriftHiveMetastore_drop_type_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_type_result() throw() {} + + bool success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_drop_type_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_type_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_type_presult() throw() {} + + bool* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_drop_type_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_type_all_args() : name("") { + } + + virtual ~ThriftHiveMetastore_get_type_all_args() throw() {} + + std::string name; + + _ThriftHiveMetastore_get_type_all_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_type_all_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_all_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_type_all_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_type_all_pargs() throw() {} + + const std::string* name; + + 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: + + ThriftHiveMetastore_get_type_all_result() { + } + + virtual ~ThriftHiveMetastore_get_type_all_result() throw() {} + + std::map success; + MetaException o2; + + _ThriftHiveMetastore_get_type_all_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_type_all_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_all_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_type_all_presult() throw() {} + + std::map * success; + MetaException o2; + + _ThriftHiveMetastore_get_type_all_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_fields_args() : db_name(""), table_name("") { + } + + virtual ~ThriftHiveMetastore_get_fields_args() throw() {} + + std::string db_name; + std::string table_name; + + _ThriftHiveMetastore_get_fields_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_fields_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_fields_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_fields_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + + 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: + + ThriftHiveMetastore_get_fields_result() { + } + + virtual ~ThriftHiveMetastore_get_fields_result() throw() {} + + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_fields_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_fields_presult() throw() {} + + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_schema_args() : db_name(""), table_name("") { + } + + virtual ~ThriftHiveMetastore_get_schema_args() throw() {} + + std::string db_name; + std::string table_name; + + _ThriftHiveMetastore_get_schema_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_schema_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_schema_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_schema_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + + 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: + + ThriftHiveMetastore_get_schema_result() { + } + + virtual ~ThriftHiveMetastore_get_schema_result() throw() {} + + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_schema_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_schema_presult() throw() {} + + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_presult__isset __isset; + + 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: + + ThriftHiveMetastore_create_table_args() { + } + + virtual ~ThriftHiveMetastore_create_table_args() throw() {} + + Table tbl; + + _ThriftHiveMetastore_create_table_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_table_args & rhs) const + { + if (!(tbl == rhs.tbl)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_create_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_table_pargs() throw() {} + + const Table* tbl; + + 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: + + ThriftHiveMetastore_create_table_result() { + } + + virtual ~ThriftHiveMetastore_create_table_result() throw() {} + + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_create_table_presult() throw() {} + + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_table_args() : dbname(""), name(""), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_table_args() throw() {} + + std::string dbname; + std::string name; + bool deleteData; + + _ThriftHiveMetastore_drop_table_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(name == rhs.name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_table_pargs() throw() {} + + const std::string* dbname; + const std::string* name; + const bool* deleteData; + + 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: + + ThriftHiveMetastore_drop_table_result() { + } + + virtual ~ThriftHiveMetastore_drop_table_result() throw() {} + + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_table_presult() throw() {} + + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_tables_args() : db_name(""), pattern("") { + } + + virtual ~ThriftHiveMetastore_get_tables_args() throw() {} + + std::string db_name; + std::string pattern; + + _ThriftHiveMetastore_get_tables_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(pattern == rhs.pattern)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_tables_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_tables_pargs() throw() {} + + const std::string* db_name; + const std::string* pattern; + + 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: + + ThriftHiveMetastore_get_tables_result() { + } + + virtual ~ThriftHiveMetastore_get_tables_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_tables_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_tables_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_all_tables_args() : db_name("") { + } + + virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {} + + std::string db_name; + + _ThriftHiveMetastore_get_all_tables_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_all_tables_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw() {} + + const std::string* db_name; + + 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: + + ThriftHiveMetastore_get_all_tables_result() { + } + + virtual ~ThriftHiveMetastore_get_all_tables_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_all_tables_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_all_tables_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_all_tables_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_table_args() : dbname(""), tbl_name("") { + } + + virtual ~ThriftHiveMetastore_get_table_args() throw() {} + + std::string dbname; + std::string tbl_name; + + _ThriftHiveMetastore_get_table_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_pargs() throw() {} + + const std::string* dbname; + const std::string* tbl_name; + + 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: + + ThriftHiveMetastore_get_table_result() { + } + + virtual ~ThriftHiveMetastore_get_table_result() throw() {} + + Table success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_table_presult() throw() {} + + Table* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_presult__isset __isset; + + 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: + + ThriftHiveMetastore_alter_table_args() : dbname(""), tbl_name("") { + } + + virtual ~ThriftHiveMetastore_alter_table_args() throw() {} + + std::string dbname; + std::string tbl_name; + Table new_tbl; + + _ThriftHiveMetastore_alter_table_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_tbl == rhs.new_tbl)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_alter_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_table_pargs() throw() {} + + const std::string* dbname; + const std::string* tbl_name; + const Table* new_tbl; + + 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: + + ThriftHiveMetastore_alter_table_result() { + } + + virtual ~ThriftHiveMetastore_alter_table_result() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_alter_table_presult() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_presult__isset __isset; + + 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: + + ThriftHiveMetastore_add_partition_args() { + } + + virtual ~ThriftHiveMetastore_add_partition_args() throw() {} + + Partition new_part; + + _ThriftHiveMetastore_add_partition_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_partition_args & rhs) const + { + if (!(new_part == rhs.new_part)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_add_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partition_pargs() throw() {} + + const Partition* new_part; + + 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: + + ThriftHiveMetastore_add_partition_result() { + } + + virtual ~ThriftHiveMetastore_add_partition_result() throw() {} + + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_add_partition_presult() throw() {} + + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_presult__isset __isset; + + 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: + + ThriftHiveMetastore_append_partition_args() : db_name(""), tbl_name("") { + } + + virtual ~ThriftHiveMetastore_append_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + + _ThriftHiveMetastore_append_partition_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_append_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_append_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + + 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: + + ThriftHiveMetastore_append_partition_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_result() throw() {} + + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_append_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_append_partition_presult() throw() {} + + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_presult__isset __isset; + + 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: + + ThriftHiveMetastore_append_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + + _ThriftHiveMetastore_append_partition_by_name_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_append_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + + 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: + + ThriftHiveMetastore_append_partition_by_name_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_result() throw() {} + + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_presult() throw() {} + + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_partition_args() : db_name(""), tbl_name(""), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + bool deleteData; + + _ThriftHiveMetastore_drop_partition_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const bool* deleteData; + + 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: + + ThriftHiveMetastore_drop_partition_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_partition_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_partition_by_name_args() : db_name(""), tbl_name(""), part_name(""), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + bool deleteData; + + _ThriftHiveMetastore_drop_partition_by_name_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const bool* deleteData; + + 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: + + ThriftHiveMetastore_drop_partition_by_name_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partition_args() : db_name(""), tbl_name("") { + } + + virtual ~ThriftHiveMetastore_get_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + + _ThriftHiveMetastore_get_partition_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + + 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: + + ThriftHiveMetastore_get_partition_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_result() throw() {} + + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partition_presult() throw() {} + + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + } + + virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + + _ThriftHiveMetastore_get_partition_by_name_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_by_name_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + + 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: + + ThriftHiveMetastore_get_partition_by_name_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_by_name_result() throw() {} + + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_by_name_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partition_by_name_presult() throw() {} + + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_by_name_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partitions_args() : db_name(""), tbl_name(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_args() throw() {} + + std::string db_name; + std::string tbl_name; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_parts; + + 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: + + ThriftHiveMetastore_get_partitions_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_result() throw() {} + + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partitions_presult() throw() {} + + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partition_names_args() : db_name(""), tbl_name(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partition_names_args() throw() {} + + std::string db_name; + std::string tbl_name; + int16_t max_parts; + + _ThriftHiveMetastore_get_partition_names_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partition_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_parts; + + 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: + + ThriftHiveMetastore_get_partition_names_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_names_result() throw() {} + + std::vector success; + MetaException o2; + + _ThriftHiveMetastore_get_partition_names_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partition_names_presult() throw() {} + + std::vector * success; + MetaException o2; + + _ThriftHiveMetastore_get_partition_names_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partitions_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_ps_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partitions_ps_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const int16_t* max_parts; + + 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: + + ThriftHiveMetastore_get_partitions_ps_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_partitions_ps_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_partitions_ps_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + + _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partition_names_ps_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const int16_t* max_parts; + + 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: + + ThriftHiveMetastore_get_partition_names_ps_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partition_names_ps_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_partition_names_ps_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(""), tbl_name(""), filter(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string filter; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_by_filter_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(filter == rhs.filter)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_partitions_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* filter; + const int16_t* max_parts; + + 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: + + ThriftHiveMetastore_get_partitions_by_filter_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_result() throw() {} + + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_filter_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_presult() throw() {} + + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_filter_presult__isset __isset; + + 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: + + ThriftHiveMetastore_alter_partition_args() : db_name(""), tbl_name("") { + } + + virtual ~ThriftHiveMetastore_alter_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + Partition new_part; + + _ThriftHiveMetastore_alter_partition_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_part == rhs.new_part)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_alter_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_partition_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const Partition* new_part; + + 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: + + ThriftHiveMetastore_alter_partition_result() { + } + + virtual ~ThriftHiveMetastore_alter_partition_result() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_partition_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_alter_partition_presult() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_config_value_args() : name(""), defaultValue("") { + } + + virtual ~ThriftHiveMetastore_get_config_value_args() throw() {} + + std::string name; + std::string defaultValue; + + _ThriftHiveMetastore_get_config_value_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_config_value_args & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(defaultValue == rhs.defaultValue)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_config_value_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_config_value_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_config_value_pargs() throw() {} + + const std::string* name; + const std::string* defaultValue; + + 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: + + ThriftHiveMetastore_get_config_value_result() : success("") { + } + + virtual ~ThriftHiveMetastore_get_config_value_result() throw() {} + + std::string success; + ConfigValSecurityException o1; + + _ThriftHiveMetastore_get_config_value_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_config_value_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_config_value_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_config_value_presult() throw() {} + + std::string* success; + ConfigValSecurityException o1; + + _ThriftHiveMetastore_get_config_value_presult__isset __isset; + + 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: + + ThriftHiveMetastore_partition_name_to_vals_args() : part_name("") { + } + + virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw() {} + + std::string part_name; + + _ThriftHiveMetastore_partition_name_to_vals_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_partition_name_to_vals_args & rhs) const + { + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_vals_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_partition_name_to_vals_pargs { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_vals_pargs() throw() {} + + const std::string* part_name; + + 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: + + ThriftHiveMetastore_partition_name_to_vals_result() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_vals_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_vals_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_partition_name_to_vals_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_vals_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_partition_name_to_vals_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_vals_presult__isset __isset; + + 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: + + ThriftHiveMetastore_partition_name_to_spec_args() : part_name("") { + } + + virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw() {} + + std::string part_name; + + _ThriftHiveMetastore_partition_name_to_spec_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_partition_name_to_spec_args & rhs) const + { + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_spec_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_partition_name_to_spec_pargs { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_spec_pargs() throw() {} + + const std::string* part_name; + + 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: + + ThriftHiveMetastore_partition_name_to_spec_result() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_spec_result() throw() {} + + std::map success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_spec_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_partition_name_to_spec_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_spec_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_partition_name_to_spec_presult() throw() {} + + std::map * success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_spec_presult__isset __isset; + + 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: + + ThriftHiveMetastore_add_index_args() { + } + + virtual ~ThriftHiveMetastore_add_index_args() throw() {} + + Index new_index; + Table index_table; + + _ThriftHiveMetastore_add_index_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_index_args & rhs) const + { + if (!(new_index == rhs.new_index)) + return false; + if (!(index_table == rhs.index_table)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_index_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_add_index_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_index_pargs() throw() {} + + const Index* new_index; + const Table* index_table; + + 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: + + ThriftHiveMetastore_add_index_result() { + } + + virtual ~ThriftHiveMetastore_add_index_result() throw() {} + + Index success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_index_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_index_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_index_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_add_index_presult() throw() {} + + Index* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_index_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_index_args__isset { + _ThriftHiveMetastore_alter_index_args__isset() : dbname(false), base_tbl_name(false), idx_name(false), new_idx(false) {} + bool dbname; + bool base_tbl_name; + bool idx_name; + bool new_idx; +} _ThriftHiveMetastore_alter_index_args__isset; + +class ThriftHiveMetastore_alter_index_args { + public: + + ThriftHiveMetastore_alter_index_args() : dbname(""), base_tbl_name(""), idx_name("") { + } + + virtual ~ThriftHiveMetastore_alter_index_args() throw() {} + + std::string dbname; + std::string base_tbl_name; + std::string idx_name; + Index new_idx; + + _ThriftHiveMetastore_alter_index_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_index_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(base_tbl_name == rhs.base_tbl_name)) + return false; + if (!(idx_name == rhs.idx_name)) + return false; + if (!(new_idx == rhs.new_idx)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_index_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_index_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_index_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_index_pargs() throw() {} + + const std::string* dbname; + const std::string* base_tbl_name; + const std::string* idx_name; + const Index* new_idx; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_index_result__isset { + _ThriftHiveMetastore_alter_index_result__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_index_result__isset; + +class ThriftHiveMetastore_alter_index_result { + public: + + ThriftHiveMetastore_alter_index_result() { + } + + virtual ~ThriftHiveMetastore_alter_index_result() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_index_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_alter_index_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_index_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_index_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_index_presult__isset { + _ThriftHiveMetastore_alter_index_presult__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_index_presult__isset; + +class ThriftHiveMetastore_alter_index_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_index_presult() throw() {} + + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_index_presult__isset __isset; + + 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: + + ThriftHiveMetastore_drop_index_by_name_args() : db_name(""), tbl_name(""), index_name(""), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string index_name; + bool deleteData; + + _ThriftHiveMetastore_drop_index_by_name_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_index_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(index_name == rhs.index_name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_index_by_name_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_drop_index_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_index_by_name_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* index_name; + const bool* deleteData; + + 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: + + ThriftHiveMetastore_drop_index_by_name_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_index_by_name_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_index_by_name_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_index_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_index_by_name_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_drop_index_by_name_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_index_by_name_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_index_by_name_args() : db_name(""), tbl_name(""), index_name("") { + } + + virtual ~ThriftHiveMetastore_get_index_by_name_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string index_name; + + _ThriftHiveMetastore_get_index_by_name_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_index_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(index_name == rhs.index_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_by_name_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_index_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_index_by_name_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* index_name; + + 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: + + ThriftHiveMetastore_get_index_by_name_result() { + } + + virtual ~ThriftHiveMetastore_get_index_by_name_result() throw() {} + + Index success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_index_by_name_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_index_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_by_name_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_index_by_name_presult() throw() {} + + Index* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_index_by_name_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_indexes_args() : db_name(""), tbl_name(""), max_indexes(-1) { + } + + virtual ~ThriftHiveMetastore_get_indexes_args() throw() {} + + std::string db_name; + std::string tbl_name; + int16_t max_indexes; + + _ThriftHiveMetastore_get_indexes_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_indexes_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_indexes == rhs.max_indexes)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_indexes_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_indexes_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_indexes_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_indexes; + + 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: + + ThriftHiveMetastore_get_indexes_result() { + } + + virtual ~ThriftHiveMetastore_get_indexes_result() throw() {} + + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_indexes_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_indexes_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_indexes_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_indexes_presult() throw() {} + + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_indexes_presult__isset __isset; + + 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: + + ThriftHiveMetastore_get_index_names_args() : db_name(""), tbl_name(""), max_indexes(-1) { + } + + virtual ~ThriftHiveMetastore_get_index_names_args() throw() {} + + std::string db_name; + std::string tbl_name; + int16_t max_indexes; + + _ThriftHiveMetastore_get_index_names_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_index_names_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_indexes == rhs.max_indexes)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_names_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + + +class ThriftHiveMetastore_get_index_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_index_names_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_indexes; + + 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: + + ThriftHiveMetastore_get_index_names_result() { + } + + virtual ~ThriftHiveMetastore_get_index_names_result() throw() {} + + std::vector success; + MetaException o2; + + _ThriftHiveMetastore_get_index_names_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_index_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_names_result &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +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: + + + virtual ~ThriftHiveMetastore_get_index_names_presult() throw() {} + + std::vector * success; + MetaException o2; + + _ThriftHiveMetastore_get_index_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { + public: + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + facebook::fb303::FacebookServiceClient(prot, prot) {} + 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< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void create_database(const Database& database); + void send_create_database(const Database& database); + void recv_create_database(); + void get_database(Database& _return, const std::string& name); + void send_get_database(const std::string& name); + void recv_get_database(Database& _return); + void drop_database(const std::string& name, const bool deleteData); + void send_drop_database(const std::string& name, const bool deleteData); + void recv_drop_database(); + void get_databases(std::vector & _return, const std::string& pattern); + void send_get_databases(const std::string& pattern); + void recv_get_databases(std::vector & _return); + void get_all_databases(std::vector & _return); + void send_get_all_databases(); + void recv_get_all_databases(std::vector & _return); + void get_type(Type& _return, const std::string& name); + void send_get_type(const std::string& name); + void recv_get_type(Type& _return); + bool create_type(const Type& type); + void send_create_type(const Type& type); + bool recv_create_type(); + bool drop_type(const std::string& type); + void send_drop_type(const std::string& type); + bool recv_drop_type(); + void get_type_all(std::map & _return, const std::string& name); + void send_get_type_all(const std::string& name); + void recv_get_type_all(std::map & _return); + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_fields(const std::string& db_name, const std::string& table_name); + void recv_get_fields(std::vector & _return); + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_schema(const std::string& db_name, const std::string& table_name); + void recv_get_schema(std::vector & _return); + void create_table(const Table& tbl); + void send_create_table(const Table& tbl); + void recv_create_table(); + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void recv_drop_table(); + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); + void send_get_tables(const std::string& db_name, const std::string& pattern); + void recv_get_tables(std::vector & _return); + void get_all_tables(std::vector & _return, const std::string& db_name); + void send_get_all_tables(const std::string& db_name); + void recv_get_all_tables(std::vector & _return); + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); + void send_get_table(const std::string& dbname, const std::string& tbl_name); + void recv_get_table(Table& _return); + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void recv_alter_table(); + void add_partition(Partition& _return, const Partition& new_part); + void send_add_partition(const Partition& new_part); + void recv_add_partition(Partition& _return); + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_append_partition(Partition& _return); + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_append_partition_by_name(Partition& _return); + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + bool recv_drop_partition(); + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + bool recv_drop_partition_by_name(); + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_get_partition(Partition& _return); + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_get_partition_by_name(Partition& _return); + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partitions(std::vector & _return); + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partition_names(std::vector & _return); + void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partitions_ps(std::vector & _return); + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partition_names_ps(std::vector & _return); + void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void recv_get_partitions_by_filter(std::vector & _return); + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void recv_alter_partition(); + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); + void send_get_config_value(const std::string& name, const std::string& defaultValue); + void recv_get_config_value(std::string& _return); + void partition_name_to_vals(std::vector & _return, const std::string& part_name); + void send_partition_name_to_vals(const std::string& part_name); + void recv_partition_name_to_vals(std::vector & _return); + void partition_name_to_spec(std::map & _return, const std::string& part_name); + void send_partition_name_to_spec(const std::string& part_name); + void recv_partition_name_to_spec(std::map & _return); + void add_index(Index& _return, const Index& new_index, const Table& index_table); + void send_add_index(const Index& new_index, const Table& index_table); + void recv_add_index(Index& _return); + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void recv_alter_index(); + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + bool recv_drop_index_by_name(); + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void recv_get_index_by_name(Index& _return); + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_indexes(std::vector & _return); + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_index_names(std::vector & _return); +}; + +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); + 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_alter_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), + iface_(iface) { + processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; + processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; + processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database; + processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases; + processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases; + processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type; + processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type; + processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type; + processMap_["get_type_all"] = &ThriftHiveMetastoreProcessor::process_get_type_all; + processMap_["get_fields"] = &ThriftHiveMetastoreProcessor::process_get_fields; + processMap_["get_schema"] = &ThriftHiveMetastoreProcessor::process_get_schema; + processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table; + processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table; + processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables; + processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; + processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; + processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; + processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; + processMap_["append_partition"] = &ThriftHiveMetastoreProcessor::process_append_partition; + processMap_["append_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name; + processMap_["drop_partition"] = &ThriftHiveMetastoreProcessor::process_drop_partition; + processMap_["drop_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name; + processMap_["get_partition"] = &ThriftHiveMetastoreProcessor::process_get_partition; + processMap_["get_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_get_partition_by_name; + processMap_["get_partitions"] = &ThriftHiveMetastoreProcessor::process_get_partitions; + processMap_["get_partition_names"] = &ThriftHiveMetastoreProcessor::process_get_partition_names; + processMap_["get_partitions_ps"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps; + processMap_["get_partition_names_ps"] = &ThriftHiveMetastoreProcessor::process_get_partition_names_ps; + processMap_["get_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_filter; + processMap_["alter_partition"] = &ThriftHiveMetastoreProcessor::process_alter_partition; + processMap_["get_config_value"] = &ThriftHiveMetastoreProcessor::process_get_config_value; + processMap_["partition_name_to_vals"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_vals; + processMap_["partition_name_to_spec"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_spec; + processMap_["add_index"] = &ThriftHiveMetastoreProcessor::process_add_index; + processMap_["alter_index"] = &ThriftHiveMetastoreProcessor::process_alter_index; + processMap_["drop_index_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_index_by_name; + processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; + processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; + processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; + } + + virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot); + virtual ~ThriftHiveMetastoreProcessor() {} +}; + +class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceMultiface { + public: + ThriftHiveMetastoreMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + std::vector >::iterator iter; + for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { + facebook::fb303::FacebookServiceMultiface::add(*iter); + } + } + virtual ~ThriftHiveMetastoreMultiface() {} + protected: + std::vector > ifaces_; + ThriftHiveMetastoreMultiface() {} + void add(boost::shared_ptr iface) { + facebook::fb303::FacebookServiceMultiface::add(iface); + ifaces_.push_back(iface); + } + public: + void create_database(const Database& database) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->create_database(database); + } + } + + void get_database(Database& _return, const std::string& name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_database(_return, name); + return; + } else { + ifaces_[i]->get_database(_return, name); + } + } + } + + void drop_database(const std::string& name, const bool deleteData) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->drop_database(name, deleteData); + } + } + + void get_databases(std::vector & _return, const std::string& pattern) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_databases(_return, pattern); + return; + } else { + ifaces_[i]->get_databases(_return, pattern); + } + } + } + + void get_all_databases(std::vector & _return) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_all_databases(_return); + return; + } else { + ifaces_[i]->get_all_databases(_return); + } + } + } + + void get_type(Type& _return, const std::string& name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_type(_return, name); + return; + } else { + ifaces_[i]->get_type(_return, name); + } + } + } + + bool create_type(const Type& type) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->create_type(type); + } else { + ifaces_[i]->create_type(type); + } + } + } + + bool drop_type(const std::string& type) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_type(type); + } else { + ifaces_[i]->drop_type(type); + } + } + } + + void get_type_all(std::map & _return, const std::string& name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_type_all(_return, name); + return; + } else { + ifaces_[i]->get_type_all(_return, name); + } + } + } + + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_fields(_return, db_name, table_name); + return; + } else { + ifaces_[i]->get_fields(_return, db_name, table_name); + } + } + } + + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_schema(_return, db_name, table_name); + return; + } else { + ifaces_[i]->get_schema(_return, db_name, table_name); + } + } + } + + void create_table(const Table& tbl) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->create_table(tbl); + } + } + + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->drop_table(dbname, name, deleteData); + } + } + + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_tables(_return, db_name, pattern); + return; + } else { + ifaces_[i]->get_tables(_return, db_name, pattern); + } + } + } + + void get_all_tables(std::vector & _return, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_all_tables(_return, db_name); + return; + } else { + ifaces_[i]->get_all_tables(_return, db_name); + } + } + } + + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table(_return, dbname, tbl_name); + return; + } else { + ifaces_[i]->get_table(_return, dbname, tbl_name); + } + } + } + + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); + } + } + + void add_partition(Partition& _return, const Partition& new_part) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->add_partition(_return, new_part); + return; + } else { + ifaces_[i]->add_partition(_return, new_part); + } + } + } + + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); + return; + } else { + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); + } + } + } + + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); + return; + } else { + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); + } + } + } + + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); + } else { + ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); + } + } + } + + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + } else { + ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + } + } + } + + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); + return; + } else { + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); + } + } + } + + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); + return; + } else { + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); + } + } + } + + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); + return; + } else { + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); + } + } + } + + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); + return; + } else { + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); + } + } + } + + void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; + } else { + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); + } + } + } + + void 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) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; + } else { + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); + } + } + } + + void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); + return; + } else { + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); + } + } + } + + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->alter_partition(db_name, tbl_name, new_part); + } + } + + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_config_value(_return, name, defaultValue); + return; + } else { + ifaces_[i]->get_config_value(_return, name, defaultValue); + } + } + } + + void partition_name_to_vals(std::vector & _return, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->partition_name_to_vals(_return, part_name); + return; + } else { + ifaces_[i]->partition_name_to_vals(_return, part_name); + } + } + } + + void partition_name_to_spec(std::map & _return, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->partition_name_to_spec(_return, part_name); + return; + } else { + ifaces_[i]->partition_name_to_spec(_return, part_name); + } + } + } + + void add_index(Index& _return, const Index& new_index, const Table& index_table) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->add_index(_return, new_index, index_table); + return; + } else { + ifaces_[i]->add_index(_return, new_index, index_table); + } + } + } + + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); + } + } + + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); + } else { + ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); + } + } + } + + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); + return; + } else { + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); + } + } + } + + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); + return; + } else { + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); + } + } + } + + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); + return; + } else { + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); + } + } + } + +}; + +}}} // namespace + +#endif diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp new file mode 100644 index 0000000..9fcfac2 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -0,0 +1,234 @@ +// This autogenerated skeleton file illustrates how to build a server. +// You should copy it to another filename to avoid overwriting it. + +#include "ThriftHiveMetastore.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 ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { + public: + ThriftHiveMetastoreHandler() { + // Your initialization goes here + } + + void create_database(const Database& database) { + // Your implementation goes here + printf("create_database\n"); + } + + void get_database(Database& _return, const std::string& name) { + // Your implementation goes here + printf("get_database\n"); + } + + void drop_database(const std::string& name, const bool deleteData) { + // Your implementation goes here + printf("drop_database\n"); + } + + void get_databases(std::vector & _return, const std::string& pattern) { + // Your implementation goes here + printf("get_databases\n"); + } + + void get_all_databases(std::vector & _return) { + // Your implementation goes here + printf("get_all_databases\n"); + } + + void get_type(Type& _return, const std::string& name) { + // Your implementation goes here + printf("get_type\n"); + } + + bool create_type(const Type& type) { + // Your implementation goes here + printf("create_type\n"); + } + + bool drop_type(const std::string& type) { + // Your implementation goes here + printf("drop_type\n"); + } + + void get_type_all(std::map & _return, const std::string& name) { + // Your implementation goes here + printf("get_type_all\n"); + } + + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("get_fields\n"); + } + + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("get_schema\n"); + } + + void create_table(const Table& tbl) { + // Your implementation goes here + printf("create_table\n"); + } + + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { + // Your implementation goes here + printf("drop_table\n"); + } + + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { + // Your implementation goes here + printf("get_tables\n"); + } + + void get_all_tables(std::vector & _return, const std::string& db_name) { + // Your implementation goes here + printf("get_all_tables\n"); + } + + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { + // Your implementation goes here + printf("get_table\n"); + } + + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { + // Your implementation goes here + printf("alter_table\n"); + } + + void add_partition(Partition& _return, const Partition& new_part) { + // Your implementation goes here + printf("add_partition\n"); + } + + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + // Your implementation goes here + printf("append_partition\n"); + } + + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + // Your implementation goes here + printf("append_partition_by_name\n"); + } + + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { + // Your implementation goes here + printf("drop_partition\n"); + } + + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { + // Your implementation goes here + printf("drop_partition_by_name\n"); + } + + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + // Your implementation goes here + printf("get_partition\n"); + } + + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + // Your implementation goes here + printf("get_partition_by_name\n"); + } + + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + // Your implementation goes here + printf("get_partitions\n"); + } + + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + // Your implementation goes here + printf("get_partition_names\n"); + } + + void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { + // Your implementation goes here + printf("get_partitions_ps\n"); + } + + void 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) { + // Your implementation goes here + printf("get_partition_names_ps\n"); + } + + void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { + // Your implementation goes here + printf("get_partitions_by_filter\n"); + } + + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { + // Your implementation goes here + printf("alter_partition\n"); + } + + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { + // Your implementation goes here + printf("get_config_value\n"); + } + + void partition_name_to_vals(std::vector & _return, const std::string& part_name) { + // Your implementation goes here + printf("partition_name_to_vals\n"); + } + + void partition_name_to_spec(std::map & _return, const std::string& part_name) { + // Your implementation goes here + printf("partition_name_to_spec\n"); + } + + void add_index(Index& _return, const Index& new_index, const Table& index_table) { + // Your implementation goes here + printf("add_index\n"); + } + + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { + // Your implementation goes here + printf("alter_index\n"); + } + + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { + // Your implementation goes here + printf("drop_index_by_name\n"); + } + + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { + // Your implementation goes here + printf("get_index_by_name\n"); + } + + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + // Your implementation goes here + printf("get_indexes\n"); + } + + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + // Your implementation goes here + printf("get_index_names\n"); + } + +}; + +int main(int argc, char **argv) { + int port = 9090; + shared_ptr handler(new ThriftHiveMetastoreHandler()); + shared_ptr processor(new ThriftHiveMetastoreProcessor(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 metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp new file mode 100644 index 0000000..7782be0 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "hive_metastore_constants.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +const hive_metastoreConstants g_hive_metastore_constants; + +hive_metastoreConstants::hive_metastoreConstants() { + DDL_TIME = "transient_lastDdlTime"; + + IS_ARCHIVED = "is_archived"; + + ORIGINAL_LOCATION = "original_location"; + + META_TABLE_COLUMNS = "columns"; + + META_TABLE_COLUMN_TYPES = "columns.types"; + + BUCKET_FIELD_NAME = "bucket_field_name"; + + BUCKET_COUNT = "bucket_count"; + + FIELD_TO_DIMENSION = "field_to_dimension"; + + META_TABLE_NAME = "name"; + + META_TABLE_DB = "db"; + + META_TABLE_LOCATION = "location"; + + META_TABLE_SERDE = "serde"; + + META_TABLE_PARTITION_COLUMNS = "partition_columns"; + + FILE_INPUT_FORMAT = "file.inputformat"; + + FILE_OUTPUT_FORMAT = "file.outputformat"; + + META_TABLE_STORAGE = "storage_handler"; + +} + +}}} // namespace + diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h new file mode 100644 index 0000000..5758b90 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h @@ -0,0 +1,39 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef hive_metastore_CONSTANTS_H +#define hive_metastore_CONSTANTS_H + +#include "hive_metastore_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +class hive_metastoreConstants { + public: + hive_metastoreConstants(); + + std::string DDL_TIME; + std::string IS_ARCHIVED; + std::string ORIGINAL_LOCATION; + std::string META_TABLE_COLUMNS; + std::string META_TABLE_COLUMN_TYPES; + std::string BUCKET_FIELD_NAME; + std::string BUCKET_COUNT; + std::string FIELD_TO_DIMENSION; + std::string META_TABLE_NAME; + std::string META_TABLE_DB; + std::string META_TABLE_LOCATION; + std::string META_TABLE_SERDE; + std::string META_TABLE_PARTITION_COLUMNS; + std::string FILE_INPUT_FORMAT; + std::string FILE_OUTPUT_FORMAT; + std::string META_TABLE_STORAGE; +}; + +extern const hive_metastoreConstants g_hive_metastore_constants; + +}}} // namespace + +#endif diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp new file mode 100644 index 0000000..a772813 --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -0,0 +1,1897 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "hive_metastore_types.h" + +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 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->version); + this->__isset.version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->comments); + this->__isset.comments = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->version); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->comments); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->comment); + this->__isset.comment = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + 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->writeString(this->comment); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type1); + this->__isset.type1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type2); + this->__isset.type2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fields.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + iprot->readListBegin(_etype3, _size0); + this->fields.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += this->fields[_i4].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.fields = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + if (this->__isset.type1) { + 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->writeString(this->type2); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fields) { + xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4); + { + 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) + { + xfer += (*_iter5).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->locationUri); + this->__isset.locationUri = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + 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->writeString(this->locationUri); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->serializationLib); + this->__isset.serializationLib = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size6; + ::apache::thrift::protocol::TType _ktype7; + ::apache::thrift::protocol::TType _vtype8; + iprot->readMapBegin(_ktype7, _vtype8, _size6); + uint32_t _i10; + for (_i10 = 0; _i10 < _size6; ++_i10) + { + std::string _key11; + xfer += iprot->readString(_key11); + std::string& _val12 = this->parameters[_key11]; + xfer += iprot->readString(_val12); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->name); + xfer += oprot->writeFieldEnd(); + 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->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) + { + xfer += oprot->writeString(_iter13->first); + xfer += oprot->writeString(_iter13->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->col); + this->__isset.col = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->order); + this->__isset.order = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->col); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->order); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->cols.clear(); + uint32_t _size14; + ::apache::thrift::protocol::TType _etype17; + iprot->readListBegin(_etype17, _size14); + this->cols.resize(_size14); + uint32_t _i18; + for (_i18 = 0; _i18 < _size14; ++_i18) + { + xfer += this->cols[_i18].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.cols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->location); + this->__isset.location = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->inputFormat); + this->__isset.inputFormat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->outputFormat); + this->__isset.outputFormat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->compressed); + this->__isset.compressed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->numBuckets); + this->__isset.numBuckets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->serdeInfo.read(iprot); + this->__isset.serdeInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->bucketCols.clear(); + uint32_t _size19; + ::apache::thrift::protocol::TType _etype22; + iprot->readListBegin(_etype22, _size19); + this->bucketCols.resize(_size19); + uint32_t _i23; + for (_i23 = 0; _i23 < _size19; ++_i23) + { + xfer += iprot->readString(this->bucketCols[_i23]); + } + iprot->readListEnd(); + } + this->__isset.bucketCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->sortCols.clear(); + uint32_t _size24; + ::apache::thrift::protocol::TType _etype27; + iprot->readListBegin(_etype27, _size24); + this->sortCols.resize(_size24); + uint32_t _i28; + for (_i28 = 0; _i28 < _size24; ++_i28) + { + xfer += this->sortCols[_i28].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.sortCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size29; + ::apache::thrift::protocol::TType _ktype30; + ::apache::thrift::protocol::TType _vtype31; + iprot->readMapBegin(_ktype30, _vtype31, _size29); + uint32_t _i33; + for (_i33 = 0; _i33 < _size29; ++_i33) + { + std::string _key34; + xfer += iprot->readString(_key34); + std::string& _val35 = this->parameters[_key34]; + xfer += iprot->readString(_val35); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->cols.size()); + std::vector ::const_iterator _iter36; + for (_iter36 = this->cols.begin(); _iter36 != this->cols.end(); ++_iter36) + { + xfer += (*_iter36).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + 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->writeString(this->inputFormat); + xfer += oprot->writeFieldEnd(); + 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->writeBool(this->compressed); + xfer += oprot->writeFieldEnd(); + 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 += this->serdeInfo.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); + { + 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) + { + xfer += oprot->writeString((*_iter37)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); + { + 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) + { + xfer += (*_iter38).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + 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()); + std::map ::const_iterator _iter39; + for (_iter39 = this->parameters.begin(); _iter39 != this->parameters.end(); ++_iter39) + { + xfer += oprot->writeString(_iter39->first); + xfer += oprot->writeString(_iter39->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner); + this->__isset.owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->retention); + this->__isset.retention = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitionKeys.clear(); + uint32_t _size40; + ::apache::thrift::protocol::TType _etype43; + iprot->readListBegin(_etype43, _size40); + this->partitionKeys.resize(_size40); + uint32_t _i44; + for (_i44 = 0; _i44 < _size40; ++_i44) + { + xfer += this->partitionKeys[_i44].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.partitionKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size45; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; + iprot->readMapBegin(_ktype46, _vtype47, _size45); + uint32_t _i49; + for (_i49 = 0; _i49 < _size45; ++_i49) + { + std::string _key50; + xfer += iprot->readString(_key50); + std::string& _val51 = this->parameters[_key50]; + xfer += iprot->readString(_val51); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->viewOriginalText); + this->__isset.viewOriginalText = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->viewExpandedText); + this->__isset.viewExpandedText = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableType); + this->__isset.tableType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + 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->writeString(this->owner); + xfer += oprot->writeFieldEnd(); + 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->writeI32(this->lastAccessTime); + xfer += oprot->writeFieldEnd(); + 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 += this->sd.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); + { + 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) + { + xfer += (*_iter52).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + 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()); + std::map ::const_iterator _iter53; + for (_iter53 = this->parameters.begin(); _iter53 != this->parameters.end(); ++_iter53) + { + xfer += oprot->writeString(_iter53->first); + xfer += oprot->writeString(_iter53->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + 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->writeString(this->viewExpandedText); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12); + xfer += oprot->writeString(this->tableType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size54; + ::apache::thrift::protocol::TType _etype57; + iprot->readListBegin(_etype57, _size54); + this->values.resize(_size54); + uint32_t _i58; + for (_i58 = 0; _i58 < _size54; ++_i58) + { + xfer += iprot->readString(this->values[_i58]); + } + iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size59; + ::apache::thrift::protocol::TType _ktype60; + ::apache::thrift::protocol::TType _vtype61; + iprot->readMapBegin(_ktype60, _vtype61, _size59); + uint32_t _i63; + for (_i63 = 0; _i63 < _size59; ++_i63) + { + std::string _key64; + xfer += iprot->readString(_key64); + std::string& _val65 = this->parameters[_key64]; + xfer += iprot->readString(_val65); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRING, this->values.size()); + std::vector ::const_iterator _iter66; + for (_iter66 = this->values.begin(); _iter66 != this->values.end(); ++_iter66) + { + xfer += oprot->writeString((*_iter66)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + 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->writeI32(this->lastAccessTime); + xfer += oprot->writeFieldEnd(); + 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->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) + { + xfer += oprot->writeString(_iter67->first); + xfer += oprot->writeString(_iter67->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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->indexName); + this->__isset.indexName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->indexHandlerClass); + this->__isset.indexHandlerClass = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->origTableName); + this->__isset.origTableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->indexTableName); + this->__isset.indexTableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size68; + ::apache::thrift::protocol::TType _ktype69; + ::apache::thrift::protocol::TType _vtype70; + iprot->readMapBegin(_ktype69, _vtype70, _size68); + uint32_t _i72; + for (_i72 = 0; _i72 < _size68; ++_i72) + { + std::string _key73; + xfer += iprot->readString(_key73); + std::string& _val74 = this->parameters[_key73]; + xfer += iprot->readString(_val74); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deferredRebuild); + this->__isset.deferredRebuild = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeString(this->indexName); + xfer += oprot->writeFieldEnd(); + 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->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + 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->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + 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->writeString(this->indexTableName); + xfer += oprot->writeFieldEnd(); + 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->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) + { + xfer += oprot->writeString(_iter75->first); + xfer += oprot->writeString(_iter75->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10); + xfer += oprot->writeBool(this->deferredRebuild); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; +const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; + +uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fieldSchemas.clear(); + uint32_t _size76; + ::apache::thrift::protocol::TType _etype79; + iprot->readListBegin(_etype79, _size76); + this->fieldSchemas.resize(_size76); + uint32_t _i80; + for (_i80 = 0; _i80 < _size76; ++_i80) + { + xfer += this->fieldSchemas[_i80].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.fieldSchemas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->properties.clear(); + uint32_t _size81; + ::apache::thrift::protocol::TType _ktype82; + ::apache::thrift::protocol::TType _vtype83; + iprot->readMapBegin(_ktype82, _vtype83, _size81); + uint32_t _i85; + for (_i85 = 0; _i85 < _size81; ++_i85) + { + std::string _key86; + xfer += iprot->readString(_key86); + std::string& _val87 = this->properties[_key86]; + xfer += iprot->readString(_val87); + } + iprot->readMapEnd(); + } + this->__isset.properties = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +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->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->fieldSchemas.size()); + std::vector ::const_iterator _iter88; + for (_iter88 = this->fieldSchemas.begin(); _iter88 != this->fieldSchemas.end(); ++_iter88) + { + xfer += (*_iter88).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + 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()); + std::map ::const_iterator _iter89; + for (_iter89 = this->properties.begin(); _iter89 != this->properties.end(); ++_iter89) + { + xfer += oprot->writeString(_iter89->first); + xfer += oprot->writeString(_iter89->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +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 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 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->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +}}} // namespace diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h new file mode 100644 index 0000000..78d7f4b --- /dev/null +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -0,0 +1,955 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef hive_metastore_TYPES_H +#define hive_metastore_TYPES_H + +#include +#include +#include +#include + +#include "fb303_types.h" + + +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: + + static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972"; + static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72}; + + Version() : version(""), comments("") { + } + + virtual ~Version() throw() {} + + std::string version; + std::string comments; + + _Version__isset __isset; + + bool operator == (const Version & rhs) const + { + if (!(version == rhs.version)) + return false; + if (!(comments == rhs.comments)) + return false; + return true; + } + bool operator != (const Version &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Version & ) 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: + + static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; + static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; + + FieldSchema() : name(""), type(""), comment("") { + } + + virtual ~FieldSchema() throw() {} + + std::string name; + std::string type; + std::string comment; + + _FieldSchema__isset __isset; + + bool operator == (const FieldSchema & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(type == rhs.type)) + return false; + if (!(comment == rhs.comment)) + return false; + return true; + } + bool operator != (const FieldSchema &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FieldSchema & ) 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: + + static const char* ascii_fingerprint; // = "20DF02DE523C27F7066C7BD4D9120842"; + static const uint8_t binary_fingerprint[16]; // = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; + + Type() : name(""), type1(""), type2("") { + } + + virtual ~Type() throw() {} + + std::string name; + std::string type1; + std::string type2; + std::vector fields; + + _Type__isset __isset; + + bool operator == (const Type & rhs) const + { + if (!(name == rhs.name)) + return false; + if (__isset.type1 != rhs.__isset.type1) + return false; + else if (__isset.type1 && !(type1 == rhs.type1)) + return false; + if (__isset.type2 != rhs.__isset.type2) + return false; + else if (__isset.type2 && !(type2 == rhs.type2)) + return false; + if (__isset.fields != rhs.__isset.fields) + return false; + else if (__isset.fields && !(fields == rhs.fields)) + return false; + return true; + } + bool operator != (const Type &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Type & ) 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: + + static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; + static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; + + Database() : name(""), description(""), locationUri("") { + } + + virtual ~Database() throw() {} + + std::string name; + std::string description; + std::string locationUri; + + _Database__isset __isset; + + bool operator == (const Database & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(description == rhs.description)) + return false; + if (!(locationUri == rhs.locationUri)) + return false; + return true; + } + bool operator != (const Database &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Database & ) 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: + + static const char* ascii_fingerprint; // = "B1021C32A35A2AEFCD2F57A5424159A7"; + static const uint8_t binary_fingerprint[16]; // = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; + + SerDeInfo() : name(""), serializationLib("") { + } + + virtual ~SerDeInfo() throw() {} + + std::string name; + std::string serializationLib; + std::map parameters; + + _SerDeInfo__isset __isset; + + bool operator == (const SerDeInfo & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(serializationLib == rhs.serializationLib)) + return false; + if (!(parameters == rhs.parameters)) + return false; + return true; + } + bool operator != (const SerDeInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SerDeInfo & ) 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: + + static const char* ascii_fingerprint; // = "EEBC915CE44901401D881E6091423036"; + static const uint8_t binary_fingerprint[16]; // = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; + + Order() : col(""), order(0) { + } + + virtual ~Order() throw() {} + + std::string col; + int32_t order; + + _Order__isset __isset; + + bool operator == (const Order & rhs) const + { + if (!(col == rhs.col)) + return false; + if (!(order == rhs.order)) + return false; + return true; + } + bool operator != (const Order &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Order & ) 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: + + static const char* ascii_fingerprint; // = "11E4CE18F895C13812C853DFDCD1293F"; + static const uint8_t binary_fingerprint[16]; // = {0x11,0xE4,0xCE,0x18,0xF8,0x95,0xC1,0x38,0x12,0xC8,0x53,0xDF,0xDC,0xD1,0x29,0x3F}; + + StorageDescriptor() : location(""), inputFormat(""), outputFormat(""), compressed(0), numBuckets(0) { + } + + virtual ~StorageDescriptor() throw() {} + + std::vector cols; + std::string location; + std::string inputFormat; + std::string outputFormat; + bool compressed; + int32_t numBuckets; + SerDeInfo serdeInfo; + std::vector bucketCols; + std::vector sortCols; + std::map parameters; + + _StorageDescriptor__isset __isset; + + bool operator == (const StorageDescriptor & rhs) const + { + if (!(cols == rhs.cols)) + return false; + if (!(location == rhs.location)) + return false; + if (!(inputFormat == rhs.inputFormat)) + return false; + if (!(outputFormat == rhs.outputFormat)) + return false; + if (!(compressed == rhs.compressed)) + return false; + if (!(numBuckets == rhs.numBuckets)) + return false; + if (!(serdeInfo == rhs.serdeInfo)) + return false; + if (!(bucketCols == rhs.bucketCols)) + return false; + if (!(sortCols == rhs.sortCols)) + return false; + if (!(parameters == rhs.parameters)) + return false; + return true; + } + bool operator != (const StorageDescriptor &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StorageDescriptor & ) 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: + + static const char* ascii_fingerprint; // = "F709D087CEEE7C49380296E3B423FF76"; + static const uint8_t binary_fingerprint[16]; // = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; + + Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { + } + + virtual ~Table() throw() {} + + std::string tableName; + std::string dbName; + std::string owner; + int32_t createTime; + int32_t lastAccessTime; + int32_t retention; + StorageDescriptor sd; + std::vector partitionKeys; + std::map parameters; + std::string viewOriginalText; + std::string viewExpandedText; + std::string tableType; + + _Table__isset __isset; + + bool operator == (const Table & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(owner == rhs.owner)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(retention == rhs.retention)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(partitionKeys == rhs.partitionKeys)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (!(viewOriginalText == rhs.viewOriginalText)) + return false; + if (!(viewExpandedText == rhs.viewExpandedText)) + return false; + if (!(tableType == rhs.tableType)) + return false; + return true; + } + bool operator != (const Table &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Table & ) 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: + + static const char* ascii_fingerprint; // = "E5EDC507CBBC5F6F81AAC4845B38F51B"; + static const uint8_t binary_fingerprint[16]; // = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; + + Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { + } + + virtual ~Partition() throw() {} + + std::vector values; + std::string dbName; + std::string tableName; + int32_t createTime; + int32_t lastAccessTime; + StorageDescriptor sd; + std::map parameters; + + _Partition__isset __isset; + + bool operator == (const Partition & rhs) const + { + if (!(values == rhs.values)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(parameters == rhs.parameters)) + return false; + return true; + } + bool operator != (const Partition &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Partition & ) 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: + + static const char* ascii_fingerprint; // = "5FEE4F7E28935B644F207D74459F6A29"; + static const uint8_t binary_fingerprint[16]; // = {0x5F,0xEE,0x4F,0x7E,0x28,0x93,0x5B,0x64,0x4F,0x20,0x7D,0x74,0x45,0x9F,0x6A,0x29}; + + Index() : indexName(""), indexHandlerClass(""), dbName(""), origTableName(""), createTime(0), lastAccessTime(0), indexTableName(""), deferredRebuild(0) { + } + + virtual ~Index() throw() {} + + std::string indexName; + std::string indexHandlerClass; + std::string dbName; + std::string origTableName; + int32_t createTime; + int32_t lastAccessTime; + std::string indexTableName; + StorageDescriptor sd; + std::map parameters; + bool deferredRebuild; + + _Index__isset __isset; + + bool operator == (const Index & rhs) const + { + if (!(indexName == rhs.indexName)) + return false; + if (!(indexHandlerClass == rhs.indexHandlerClass)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(origTableName == rhs.origTableName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(indexTableName == rhs.indexTableName)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (!(deferredRebuild == rhs.deferredRebuild)) + return false; + return true; + } + bool operator != (const Index &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Index & ) 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: + + static const char* ascii_fingerprint; // = "5CFEE46C975F4E2368D905109B8E3B5B"; + static const uint8_t binary_fingerprint[16]; // = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; + + Schema() { + } + + virtual ~Schema() throw() {} + + std::vector fieldSchemas; + std::map properties; + + _Schema__isset __isset; + + bool operator == (const Schema & rhs) const + { + if (!(fieldSchemas == rhs.fieldSchemas)) + return false; + if (!(properties == rhs.properties)) + return false; + return true; + } + bool operator != (const Schema &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Schema & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + MetaException() : message("") { + } + + virtual ~MetaException() throw() {} + + std::string message; + + _MetaException__isset __isset; + + bool operator == (const MetaException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const MetaException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MetaException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + UnknownTableException() : message("") { + } + + virtual ~UnknownTableException() throw() {} + + std::string message; + + _UnknownTableException__isset __isset; + + bool operator == (const UnknownTableException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnknownTableException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnknownTableException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + UnknownDBException() : message("") { + } + + virtual ~UnknownDBException() throw() {} + + std::string message; + + _UnknownDBException__isset __isset; + + bool operator == (const UnknownDBException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnknownDBException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnknownDBException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + AlreadyExistsException() : message("") { + } + + virtual ~AlreadyExistsException() throw() {} + + std::string message; + + _AlreadyExistsException__isset __isset; + + bool operator == (const AlreadyExistsException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const AlreadyExistsException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AlreadyExistsException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + InvalidObjectException() : message("") { + } + + virtual ~InvalidObjectException() throw() {} + + std::string message; + + _InvalidObjectException__isset __isset; + + bool operator == (const InvalidObjectException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidObjectException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidObjectException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + NoSuchObjectException() : message("") { + } + + virtual ~NoSuchObjectException() throw() {} + + std::string message; + + _NoSuchObjectException__isset __isset; + + bool operator == (const NoSuchObjectException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchObjectException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchObjectException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + IndexAlreadyExistsException() : message("") { + } + + virtual ~IndexAlreadyExistsException() throw() {} + + std::string message; + + _IndexAlreadyExistsException__isset __isset; + + bool operator == (const IndexAlreadyExistsException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const IndexAlreadyExistsException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IndexAlreadyExistsException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + InvalidOperationException() : message("") { + } + + virtual ~InvalidOperationException() throw() {} + + std::string message; + + _InvalidOperationException__isset __isset; + + bool operator == (const InvalidOperationException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidOperationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidOperationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + ConfigValSecurityException() : message("") { + } + + virtual ~ConfigValSecurityException() throw() {} + + std::string message; + + _ConfigValSecurityException__isset __isset; + + bool operator == (const ConfigValSecurityException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const ConfigValSecurityException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ConfigValSecurityException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +}}} // namespace + +#endif diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java new file mode 100644 index 0000000..b99801a --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public AlreadyExistsException() { + } + + public AlreadyExistsException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public AlreadyExistsException(AlreadyExistsException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AlreadyExistsException deepCopy() { + return new AlreadyExistsException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AlreadyExistsException) + return this.equals((AlreadyExistsException)that); + return false; + } + + public boolean equals(AlreadyExistsException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(AlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + AlreadyExistsException typedOther = (AlreadyExistsException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AlreadyExistsException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java new file mode 100644 index 0000000..a290841 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public ConfigValSecurityException() { + } + + public ConfigValSecurityException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public ConfigValSecurityException(ConfigValSecurityException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public ConfigValSecurityException deepCopy() { + return new ConfigValSecurityException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ConfigValSecurityException) + return this.equals((ConfigValSecurityException)that); + return false; + } + + public boolean equals(ConfigValSecurityException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ConfigValSecurityException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ConfigValSecurityException typedOther = (ConfigValSecurityException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ConfigValSecurityException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java new file mode 100644 index 0000000..b980a47 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java @@ -0,0 +1,57 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Constants { + + public static final String DDL_TIME = "transient_lastDdlTime"; + + public static final String IS_ARCHIVED = "is_archived"; + + public static final String ORIGINAL_LOCATION = "original_location"; + + public static final String META_TABLE_COLUMNS = "columns"; + + public static final String META_TABLE_COLUMN_TYPES = "columns.types"; + + public static final String BUCKET_FIELD_NAME = "bucket_field_name"; + + public static final String BUCKET_COUNT = "bucket_count"; + + public static final String FIELD_TO_DIMENSION = "field_to_dimension"; + + public static final String META_TABLE_NAME = "name"; + + public static final String META_TABLE_DB = "db"; + + public static final String META_TABLE_LOCATION = "location"; + + public static final String META_TABLE_SERDE = "serde"; + + public static final String META_TABLE_PARTITION_COLUMNS = "partition_columns"; + + public static final String FILE_INPUT_FORMAT = "file.inputformat"; + + public static final String FILE_OUTPUT_FORMAT = "file.outputformat"; + + public static final String META_TABLE_STORAGE = "storage_handler"; + +} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java new file mode 100644 index 0000000..6ae0c46 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java @@ -0,0 +1,482 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private String description; + private String locationUri; + + /** 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; + } + } + + // 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.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.LOCATION_URI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); + } + + public Database() { + } + + public Database( + String name, + String description, + String locationUri) + { + this(); + this.name = name; + this.description = description; + this.locationUri = locationUri; + } + + /** + * Performs a deep copy on other. + */ + public Database(Database other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetDescription()) { + this.description = other.description; + } + if (other.isSetLocationUri()) { + this.locationUri = other.locationUri; + } + } + + public Database deepCopy() { + return new Database(this); + } + + @Override + public void clear() { + this.name = null; + this.description = null; + this.locationUri = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + } + + public void setDescription(String description) { + this.description = description; + } + + public void unsetDescription() { + this.description = null; + } + + /** 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; + } + + public void setLocationUri(String locationUri) { + this.locationUri = locationUri; + } + + public void unsetLocationUri() { + this.locationUri = null; + } + + /** Returns true if field locationUri is set (has been asigned a value) and false otherwise */ + public boolean isSetLocationUri() { + return this.locationUri != null; + } + + 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(); + } else { + setName((String)value); + } + break; + + case DESCRIPTION: + if (value == null) { + unsetDescription(); + } else { + setDescription((String)value); + } + break; + + case LOCATION_URI: + if (value == null) { + unsetLocationUri(); + } else { + setLocationUri((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DESCRIPTION: + return getDescription(); + + case LOCATION_URI: + return getLocationUri(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DESCRIPTION: + return isSetDescription(); + case LOCATION_URI: + return isSetLocationUri(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Database) + return this.equals((Database)that); + return false; + } + + public boolean equals(Database that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_description = true && this.isSetDescription(); + boolean that_present_description = true && that.isSetDescription(); + if (this_present_description || that_present_description) { + if (!(this_present_description && that_present_description)) + return false; + if (!this.description.equals(that.description)) + return false; + } + + boolean this_present_locationUri = true && this.isSetLocationUri(); + boolean that_present_locationUri = true && that.isSetLocationUri(); + if (this_present_locationUri || that_present_locationUri) { + if (!(this_present_locationUri && that_present_locationUri)) + return false; + if (!this.locationUri.equals(that.locationUri)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Database other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Database typedOther = (Database)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDescription()) { + lastComparison = TBaseHelper.compareTo(this.description, typedOther.description); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocationUri()).compareTo(typedOther.isSetLocationUri()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocationUri()) { + lastComparison = TBaseHelper.compareTo(this.locationUri, typedOther.locationUri); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DESCRIPTION + if (field.type == TType.STRING) { + this.description = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // LOCATION_URI + if (field.type == TType.STRING) { + this.locationUri = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + if (this.description != null) { + oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); + oprot.writeString(this.description); + oprot.writeFieldEnd(); + } + if (this.locationUri != null) { + oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); + oprot.writeString(this.locationUri); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Database("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("description:"); + if (this.description == null) { + sb.append("null"); + } else { + sb.append(this.description); + } + first = false; + if (!first) sb.append(", "); + sb.append("locationUri:"); + if (this.locationUri == null) { + sb.append("null"); + } else { + sb.append(this.locationUri); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java new file mode 100644 index 0000000..de93135 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java @@ -0,0 +1,482 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private String type; + private String comment; + + /** 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; + } + } + + // 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.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); + } + + public FieldSchema() { + } + + public FieldSchema( + String name, + String type, + String comment) + { + this(); + this.name = name; + this.type = type; + this.comment = comment; + } + + /** + * Performs a deep copy on other. + */ + public FieldSchema(FieldSchema other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetComment()) { + this.comment = other.comment; + } + } + + public FieldSchema deepCopy() { + return new FieldSchema(this); + } + + @Override + public void clear() { + this.name = null; + this.type = null; + this.comment = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + } + + public void setType(String type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** 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; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public void unsetComment() { + this.comment = null; + } + + /** Returns true if field comment is set (has been asigned a value) and false otherwise */ + public boolean isSetComment() { + return this.comment != null; + } + + 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(); + } else { + setName((String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + case COMMENT: + if (value == null) { + unsetComment(); + } else { + setComment((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case TYPE: + return getType(); + + case COMMENT: + return getComment(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case TYPE: + return isSetType(); + case COMMENT: + return isSetComment(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof FieldSchema) + return this.equals((FieldSchema)that); + return false; + } + + public boolean equals(FieldSchema that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_comment = true && this.isSetComment(); + boolean that_present_comment = true && that.isSetComment(); + if (this_present_comment || that_present_comment) { + if (!(this_present_comment && that_present_comment)) + return false; + if (!this.comment.equals(that.comment)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(FieldSchema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + FieldSchema typedOther = (FieldSchema)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComment()) { + lastComparison = TBaseHelper.compareTo(this.comment, typedOther.comment); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TYPE + if (field.type == TType.STRING) { + this.type = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COMMENT + if (field.type == TType.STRING) { + this.comment = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + if (this.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(this.type); + oprot.writeFieldEnd(); + } + if (this.comment != null) { + oprot.writeFieldBegin(COMMENT_FIELD_DESC); + oprot.writeString(this.comment); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("FieldSchema("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); + sb.append("comment:"); + if (this.comment == null) { + sb.append("null"); + } else { + sb.append(this.comment); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java new file mode 100644 index 0000000..e78654f --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java @@ -0,0 +1,1132 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField ORIG_TABLE_NAME_FIELD_DESC = new TField("origTableName", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)6); + private static final TField INDEX_TABLE_NAME_FIELD_DESC = new TField("indexTableName", TType.STRING, (short)7); + private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)8); + private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)9); + private static final TField DEFERRED_REBUILD_FIELD_DESC = new TField("deferredRebuild", TType.BOOL, (short)10); + + private String indexName; + private String indexHandlerClass; + private String dbName; + private String origTableName; + private int createTime; + private int lastAccessTime; + private String indexTableName; + private StorageDescriptor sd; + private Map parameters; + private boolean deferredRebuild; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.INDEX_HANDLER_CLASS, new FieldMetaData("indexHandlerClass", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.ORIG_TABLE_NAME, new FieldMetaData("origTableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.INDEX_TABLE_NAME, new FieldMetaData("indexTableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.DEFERRED_REBUILD, new FieldMetaData("deferredRebuild", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap); + } + + public Index() { + } + + public Index( + String indexName, + String indexHandlerClass, + String dbName, + String origTableName, + int createTime, + int lastAccessTime, + String indexTableName, + StorageDescriptor sd, + Map parameters, + boolean deferredRebuild) + { + this(); + this.indexName = indexName; + this.indexHandlerClass = indexHandlerClass; + this.dbName = dbName; + this.origTableName = origTableName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.indexTableName = indexTableName; + this.sd = sd; + this.parameters = parameters; + this.deferredRebuild = deferredRebuild; + 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; + } + if (other.isSetIndexHandlerClass()) { + this.indexHandlerClass = other.indexHandlerClass; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetOrigTableName()) { + this.origTableName = other.origTableName; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + if (other.isSetIndexTableName()) { + this.indexTableName = other.indexTableName; + } + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + this.deferredRebuild = other.deferredRebuild; + } + + public Index deepCopy() { + return new Index(this); + } + + @Override + public void clear() { + this.indexName = null; + this.indexHandlerClass = null; + this.dbName = null; + this.origTableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.indexTableName = null; + this.sd = null; + this.parameters = null; + setDeferredRebuildIsSet(false); + this.deferredRebuild = false; + } + + public String getIndexName() { + return this.indexName; + } + + public void setIndexName(String indexName) { + this.indexName = indexName; + } + + public void unsetIndexName() { + this.indexName = null; + } + + /** 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; + } + + public void setIndexHandlerClass(String indexHandlerClass) { + this.indexHandlerClass = indexHandlerClass; + } + + public void unsetIndexHandlerClass() { + this.indexHandlerClass = null; + } + + /** 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; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** 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; + } + + public void setOrigTableName(String origTableName) { + this.origTableName = origTableName; + } + + public void unsetOrigTableName() { + this.origTableName = null; + } + + /** 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; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + } + + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ + public boolean isSetLastAccessTime() { + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + } + + public String getIndexTableName() { + return this.indexTableName; + } + + public void setIndexTableName(String indexTableName) { + this.indexTableName = indexTableName; + } + + public void unsetIndexTableName() { + this.indexTableName = null; + } + + /** 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; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** 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(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** 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; + setDeferredRebuildIsSet(true); + } + + public void unsetDeferredRebuild() { + __isset_bit_vector.clear(__DEFERREDREBUILD_ISSET_ID); + } + + /** Returns true if field deferredRebuild is set (has been asigned a value) and false otherwise */ + public boolean isSetDeferredRebuild() { + return __isset_bit_vector.get(__DEFERREDREBUILD_ISSET_ID); + } + + 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 { + setIndexName((String)value); + } + break; + + case INDEX_HANDLER_CLASS: + if (value == null) { + unsetIndexHandlerClass(); + } else { + setIndexHandlerClass((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case ORIG_TABLE_NAME: + if (value == null) { + unsetOrigTableName(); + } else { + setOrigTableName((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case INDEX_TABLE_NAME: + if (value == null) { + unsetIndexTableName(); + } else { + setIndexTableName((String)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case DEFERRED_REBUILD: + if (value == null) { + unsetDeferredRebuild(); + } else { + setDeferredRebuild((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case INDEX_NAME: + return getIndexName(); + + case INDEX_HANDLER_CLASS: + return getIndexHandlerClass(); + + case DB_NAME: + return getDbName(); + + case ORIG_TABLE_NAME: + return getOrigTableName(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case LAST_ACCESS_TIME: + return new Integer(getLastAccessTime()); + + case INDEX_TABLE_NAME: + return getIndexTableName(); + + case SD: + return getSd(); + + case PARAMETERS: + return getParameters(); + + case DEFERRED_REBUILD: + return new Boolean(isDeferredRebuild()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case INDEX_NAME: + return isSetIndexName(); + case INDEX_HANDLER_CLASS: + return isSetIndexHandlerClass(); + case DB_NAME: + return isSetDbName(); + case ORIG_TABLE_NAME: + return isSetOrigTableName(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case INDEX_TABLE_NAME: + return isSetIndexTableName(); + case SD: + return isSetSd(); + case PARAMETERS: + return isSetParameters(); + case DEFERRED_REBUILD: + return isSetDeferredRebuild(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Index) + return this.equals((Index)that); + return false; + } + + public boolean equals(Index that) { + if (that == null) + return false; + + boolean this_present_indexName = true && this.isSetIndexName(); + boolean that_present_indexName = true && that.isSetIndexName(); + if (this_present_indexName || that_present_indexName) { + if (!(this_present_indexName && that_present_indexName)) + return false; + if (!this.indexName.equals(that.indexName)) + return false; + } + + boolean this_present_indexHandlerClass = true && this.isSetIndexHandlerClass(); + boolean that_present_indexHandlerClass = true && that.isSetIndexHandlerClass(); + if (this_present_indexHandlerClass || that_present_indexHandlerClass) { + if (!(this_present_indexHandlerClass && that_present_indexHandlerClass)) + return false; + if (!this.indexHandlerClass.equals(that.indexHandlerClass)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_origTableName = true && this.isSetOrigTableName(); + boolean that_present_origTableName = true && that.isSetOrigTableName(); + if (this_present_origTableName || that_present_origTableName) { + if (!(this_present_origTableName && that_present_origTableName)) + return false; + if (!this.origTableName.equals(that.origTableName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_indexTableName = true && this.isSetIndexTableName(); + boolean that_present_indexTableName = true && that.isSetIndexTableName(); + if (this_present_indexTableName || that_present_indexTableName) { + if (!(this_present_indexTableName && that_present_indexTableName)) + return false; + if (!this.indexTableName.equals(that.indexTableName)) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_deferredRebuild = true; + boolean that_present_deferredRebuild = true; + if (this_present_deferredRebuild || that_present_deferredRebuild) { + if (!(this_present_deferredRebuild && that_present_deferredRebuild)) + return false; + if (this.deferredRebuild != that.deferredRebuild) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Index other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Index typedOther = (Index)other; + + lastComparison = Boolean.valueOf(isSetIndexName()).compareTo(typedOther.isSetIndexName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexName()) { + lastComparison = TBaseHelper.compareTo(this.indexName, typedOther.indexName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexHandlerClass()).compareTo(typedOther.isSetIndexHandlerClass()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexHandlerClass()) { + lastComparison = TBaseHelper.compareTo(this.indexHandlerClass, typedOther.indexHandlerClass); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrigTableName()).compareTo(typedOther.isSetOrigTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrigTableName()) { + lastComparison = TBaseHelper.compareTo(this.origTableName, typedOther.origTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexTableName()).compareTo(typedOther.isSetIndexTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexTableName()) { + lastComparison = TBaseHelper.compareTo(this.indexTableName, typedOther.indexTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeferredRebuild()).compareTo(typedOther.isSetDeferredRebuild()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeferredRebuild()) { + lastComparison = TBaseHelper.compareTo(this.deferredRebuild, typedOther.deferredRebuild); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // INDEX_NAME + if (field.type == TType.STRING) { + this.indexName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // INDEX_HANDLER_CLASS + if (field.type == TType.STRING) { + this.indexHandlerClass = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // DB_NAME + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // ORIG_TABLE_NAME + if (field.type == TType.STRING) { + this.origTableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // LAST_ACCESS_TIME + if (field.type == TType.I32) { + this.lastAccessTime = iprot.readI32(); + setLastAccessTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // INDEX_TABLE_NAME + if (field.type == TType.STRING) { + this.indexTableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // SD + if (field.type == TType.STRUCT) { + this.sd = new StorageDescriptor(); + this.sd.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 9: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map44 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) + { + String _key46; + String _val47; + _key46 = iprot.readString(); + _val47 = iprot.readString(); + this.parameters.put(_key46, _val47); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 10: // DEFERRED_REBUILD + if (field.type == TType.BOOL) { + this.deferredRebuild = iprot.readBool(); + setDeferredRebuildIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.indexName != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.indexName); + oprot.writeFieldEnd(); + } + if (this.indexHandlerClass != null) { + oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); + oprot.writeString(this.indexHandlerClass); + oprot.writeFieldEnd(); + } + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.origTableName != null) { + oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); + oprot.writeString(this.origTableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(this.lastAccessTime); + oprot.writeFieldEnd(); + if (this.indexTableName != null) { + oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); + oprot.writeString(this.indexTableName); + oprot.writeFieldEnd(); + } + if (this.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + this.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter48 : this.parameters.entrySet()) + { + oprot.writeString(_iter48.getKey()); + oprot.writeString(_iter48.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); + oprot.writeBool(this.deferredRebuild); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Index("); + boolean first = true; + + sb.append("indexName:"); + if (this.indexName == null) { + sb.append("null"); + } else { + sb.append(this.indexName); + } + first = false; + if (!first) sb.append(", "); + sb.append("indexHandlerClass:"); + if (this.indexHandlerClass == null) { + sb.append("null"); + } else { + sb.append(this.indexHandlerClass); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("origTableName:"); + if (this.origTableName == null) { + sb.append("null"); + } else { + sb.append(this.origTableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("indexTableName:"); + if (this.indexTableName == null) { + sb.append("null"); + } else { + sb.append(this.indexTableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (!first) sb.append(", "); + sb.append("deferredRebuild:"); + sb.append(this.deferredRebuild); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java new file mode 100644 index 0000000..392f6fe --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public IndexAlreadyExistsException() { + } + + public IndexAlreadyExistsException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public IndexAlreadyExistsException(IndexAlreadyExistsException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public IndexAlreadyExistsException deepCopy() { + return new IndexAlreadyExistsException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IndexAlreadyExistsException) + return this.equals((IndexAlreadyExistsException)that); + return false; + } + + public boolean equals(IndexAlreadyExistsException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(IndexAlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IndexAlreadyExistsException typedOther = (IndexAlreadyExistsException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("IndexAlreadyExistsException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java new file mode 100644 index 0000000..6749692 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public InvalidObjectException() { + } + + public InvalidObjectException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidObjectException(InvalidObjectException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidObjectException deepCopy() { + return new InvalidObjectException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidObjectException) + return this.equals((InvalidObjectException)that); + return false; + } + + public boolean equals(InvalidObjectException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(InvalidObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InvalidObjectException typedOther = (InvalidObjectException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidObjectException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java new file mode 100644 index 0000000..608a6be --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public InvalidOperationException() { + } + + public InvalidOperationException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidOperationException(InvalidOperationException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidOperationException deepCopy() { + return new InvalidOperationException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidOperationException) + return this.equals((InvalidOperationException)that); + return false; + } + + public boolean equals(InvalidOperationException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(InvalidOperationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InvalidOperationException typedOther = (InvalidOperationException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidOperationException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java new file mode 100644 index 0000000..4b76546 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public MetaException() { + } + + public MetaException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public MetaException(MetaException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public MetaException deepCopy() { + return new MetaException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof MetaException) + return this.equals((MetaException)that); + return false; + } + + public boolean equals(MetaException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(MetaException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + MetaException typedOther = (MetaException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("MetaException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java new file mode 100644 index 0000000..d78e762 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public NoSuchObjectException() { + } + + public NoSuchObjectException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public NoSuchObjectException(NoSuchObjectException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public NoSuchObjectException deepCopy() { + return new NoSuchObjectException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NoSuchObjectException) + return this.equals((NoSuchObjectException)that); + return false; + } + + public boolean equals(NoSuchObjectException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(NoSuchObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + NoSuchObjectException typedOther = (NoSuchObjectException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("NoSuchObjectException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java new file mode 100644 index 0000000..03bc8c1 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java @@ -0,0 +1,392 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private int order; + + /** 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; + } + } + + // 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); + } + + public Order() { + } + + public Order( + String col, + int order) + { + this(); + this.col = col; + this.order = order; + 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; + } + this.order = other.order; + } + + public Order deepCopy() { + return new Order(this); + } + + @Override + public void clear() { + this.col = null; + setOrderIsSet(false); + this.order = 0; + } + + public String getCol() { + return this.col; + } + + public void setCol(String col) { + this.col = col; + } + + public void unsetCol() { + this.col = null; + } + + /** 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; + setOrderIsSet(true); + } + + public void unsetOrder() { + __isset_bit_vector.clear(__ORDER_ISSET_ID); + } + + /** Returns true if field order is set (has been asigned a value) and false otherwise */ + public boolean isSetOrder() { + return __isset_bit_vector.get(__ORDER_ISSET_ID); + } + + 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(); + } else { + setCol((String)value); + } + break; + + case ORDER: + if (value == null) { + unsetOrder(); + } else { + setOrder((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL: + return getCol(); + + case ORDER: + return new Integer(getOrder()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL: + return isSetCol(); + case ORDER: + return isSetOrder(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Order) + return this.equals((Order)that); + return false; + } + + public boolean equals(Order that) { + if (that == null) + return false; + + boolean this_present_col = true && this.isSetCol(); + boolean that_present_col = true && that.isSetCol(); + if (this_present_col || that_present_col) { + if (!(this_present_col && that_present_col)) + return false; + if (!this.col.equals(that.col)) + return false; + } + + boolean this_present_order = true; + boolean that_present_order = true; + if (this_present_order || that_present_order) { + if (!(this_present_order && that_present_order)) + return false; + if (this.order != that.order) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Order other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Order typedOther = (Order)other; + + lastComparison = Boolean.valueOf(isSetCol()).compareTo(typedOther.isSetCol()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol()) { + lastComparison = TBaseHelper.compareTo(this.col, typedOther.col); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrder()).compareTo(typedOther.isSetOrder()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrder()) { + lastComparison = TBaseHelper.compareTo(this.order, typedOther.order); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // COL + if (field.type == TType.STRING) { + this.col = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ORDER + if (field.type == TType.I32) { + this.order = iprot.readI32(); + setOrderIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.col != null) { + oprot.writeFieldBegin(COL_FIELD_DESC); + oprot.writeString(this.col); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_FIELD_DESC); + oprot.writeI32(this.order); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Order("); + boolean first = true; + + sb.append("col:"); + if (this.col == null) { + sb.append("null"); + } else { + sb.append(this.col); + } + first = false; + if (!first) sb.append(", "); + sb.append("order:"); + sb.append(this.order); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java new file mode 100644 index 0000000..30ce211 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java @@ -0,0 +1,910 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)4); + private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5); + private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)6); + private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)7); + + private List values; + private String dbName; + private String tableName; + private int createTime; + private int lastAccessTime; + private StorageDescriptor sd; + private Map parameters; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); + } + + public Partition() { + } + + public Partition( + List values, + String dbName, + String tableName, + int createTime, + int lastAccessTime, + StorageDescriptor sd, + Map parameters) + { + this(); + this.values = values; + this.dbName = dbName; + this.tableName = tableName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.sd = sd; + this.parameters = parameters; + } + + /** + * 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) { + __this__values.add(other_element); + } + this.values = __this__values; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + } + + public Partition deepCopy() { + return new Partition(this); + } + + @Override + public void clear() { + this.values = null; + this.dbName = null; + this.tableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.sd = null; + this.parameters = null; + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + public java.util.Iterator getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(String elem) { + if (this.values == null) { + this.values = new ArrayList(); + } + this.values.add(elem); + } + + public List getValues() { + return this.values; + } + + public void setValues(List values) { + this.values = values; + } + + public void unsetValues() { + this.values = null; + } + + /** 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; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** 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; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** 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; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + } + + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ + public boolean isSetLastAccessTime() { + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** 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(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((List)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUES: + return getValues(); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case LAST_ACCESS_TIME: + return new Integer(getLastAccessTime()); + + case SD: + return getSd(); + + case PARAMETERS: + return getParameters(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VALUES: + return isSetValues(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case SD: + return isSetSd(); + case PARAMETERS: + return isSetParameters(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Partition) + return this.equals((Partition)that); + return false; + } + + public boolean equals(Partition that) { + if (that == null) + return false; + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Partition other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Partition typedOther = (Partition)other; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = TBaseHelper.compareTo(this.values, typedOther.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // VALUES + if (field.type == TType.LIST) { + { + TList _list35 = iprot.readListBegin(); + this.values = new ArrayList(_list35.size); + for (int _i36 = 0; _i36 < _list35.size; ++_i36) + { + String _elem37; + _elem37 = iprot.readString(); + this.values.add(_elem37); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DB_NAME + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (field.type == TType.I32) { + this.lastAccessTime = iprot.readI32(); + setLastAccessTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // SD + if (field.type == TType.STRUCT) { + this.sd = new StorageDescriptor(); + this.sd.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map38 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map38.size); + for (int _i39 = 0; _i39 < _map38.size; ++_i39) + { + String _key40; + String _val41; + _key40 = iprot.readString(); + _val41 = iprot.readString(); + this.parameters.put(_key40, _val41); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.values.size())); + for (String _iter42 : this.values) + { + oprot.writeString(_iter42); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(this.lastAccessTime); + oprot.writeFieldEnd(); + if (this.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + this.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter43 : this.parameters.entrySet()) + { + oprot.writeString(_iter43.getKey()); + oprot.writeString(_iter43.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Partition("); + boolean first = true; + + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java new file mode 100644 index 0000000..b375ddd --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java @@ -0,0 +1,477 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private Map properties; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.PROPERTIES, new FieldMetaData("properties", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap); + } + + public Schema() { + } + + public Schema( + List fieldSchemas, + Map properties) + { + this(); + this.fieldSchemas = fieldSchemas; + this.properties = properties; + } + + /** + * Performs a deep copy on other. + */ + public Schema(Schema other) { + if (other.isSetFieldSchemas()) { + List __this__fieldSchemas = new ArrayList(); + for (FieldSchema other_element : other.fieldSchemas) { + __this__fieldSchemas.add(new FieldSchema(other_element)); + } + this.fieldSchemas = __this__fieldSchemas; + } + if (other.isSetProperties()) { + Map __this__properties = new HashMap(); + for (Map.Entry other_element : other.properties.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__properties_copy_key = other_element_key; + + String __this__properties_copy_value = other_element_value; + + __this__properties.put(__this__properties_copy_key, __this__properties_copy_value); + } + this.properties = __this__properties; + } + } + + public Schema deepCopy() { + return new Schema(this); + } + + @Override + public void clear() { + this.fieldSchemas = null; + this.properties = null; + } + + public int getFieldSchemasSize() { + return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size(); + } + + public java.util.Iterator getFieldSchemasIterator() { + return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator(); + } + + public void addToFieldSchemas(FieldSchema elem) { + if (this.fieldSchemas == null) { + this.fieldSchemas = new ArrayList(); + } + this.fieldSchemas.add(elem); + } + + public List getFieldSchemas() { + return this.fieldSchemas; + } + + public void setFieldSchemas(List fieldSchemas) { + this.fieldSchemas = fieldSchemas; + } + + public void unsetFieldSchemas() { + this.fieldSchemas = null; + } + + /** 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(); + } + + public void putToProperties(String key, String val) { + if (this.properties == null) { + this.properties = new HashMap(); + } + this.properties.put(key, val); + } + + public Map getProperties() { + return this.properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public void unsetProperties() { + this.properties = null; + } + + /** Returns true if field properties is set (has been asigned a value) and false otherwise */ + public boolean isSetProperties() { + return this.properties != null; + } + + 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 { + setFieldSchemas((List)value); + } + break; + + case PROPERTIES: + if (value == null) { + unsetProperties(); + } else { + setProperties((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD_SCHEMAS: + return getFieldSchemas(); + + case PROPERTIES: + return getProperties(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD_SCHEMAS: + return isSetFieldSchemas(); + case PROPERTIES: + return isSetProperties(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Schema) + return this.equals((Schema)that); + return false; + } + + public boolean equals(Schema that) { + if (that == null) + return false; + + boolean this_present_fieldSchemas = true && this.isSetFieldSchemas(); + boolean that_present_fieldSchemas = true && that.isSetFieldSchemas(); + if (this_present_fieldSchemas || that_present_fieldSchemas) { + if (!(this_present_fieldSchemas && that_present_fieldSchemas)) + return false; + if (!this.fieldSchemas.equals(that.fieldSchemas)) + return false; + } + + boolean this_present_properties = true && this.isSetProperties(); + boolean that_present_properties = true && that.isSetProperties(); + if (this_present_properties || that_present_properties) { + if (!(this_present_properties && that_present_properties)) + return false; + if (!this.properties.equals(that.properties)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Schema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Schema typedOther = (Schema)other; + + lastComparison = Boolean.valueOf(isSetFieldSchemas()).compareTo(typedOther.isSetFieldSchemas()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFieldSchemas()) { + lastComparison = TBaseHelper.compareTo(this.fieldSchemas, typedOther.fieldSchemas); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(typedOther.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = TBaseHelper.compareTo(this.properties, typedOther.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // FIELD_SCHEMAS + if (field.type == TType.LIST) { + { + TList _list49 = iprot.readListBegin(); + this.fieldSchemas = new ArrayList(_list49.size); + for (int _i50 = 0; _i50 < _list49.size; ++_i50) + { + FieldSchema _elem51; + _elem51 = new FieldSchema(); + _elem51.read(iprot); + this.fieldSchemas.add(_elem51); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // PROPERTIES + if (field.type == TType.MAP) { + { + TMap _map52 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map52.size); + for (int _i53 = 0; _i53 < _map52.size; ++_i53) + { + String _key54; + String _val55; + _key54 = iprot.readString(); + _val55 = iprot.readString(); + this.properties.put(_key54, _val55); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.fieldSchemas != null) { + oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size())); + for (FieldSchema _iter56 : this.fieldSchemas) + { + _iter56.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.properties != null) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size())); + for (Map.Entry _iter57 : this.properties.entrySet()) + { + oprot.writeString(_iter57.getKey()); + oprot.writeString(_iter57.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Schema("); + boolean first = true; + + sb.append("fieldSchemas:"); + if (this.fieldSchemas == null) { + sb.append("null"); + } else { + sb.append(this.fieldSchemas); + } + first = false; + if (!first) sb.append(", "); + sb.append("properties:"); + if (this.properties == null) { + sb.append("null"); + } else { + sb.append(this.properties); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java new file mode 100644 index 0000000..be660da --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java @@ -0,0 +1,527 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private String serializationLib; + private Map parameters; + + /** 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; + } + } + + // 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.SERIALIZATION_LIB, new FieldMetaData("serializationLib", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(SerDeInfo.class, metaDataMap); + } + + public SerDeInfo() { + } + + public SerDeInfo( + String name, + String serializationLib, + Map parameters) + { + this(); + this.name = name; + this.serializationLib = serializationLib; + this.parameters = parameters; + } + + /** + * Performs a deep copy on other. + */ + public SerDeInfo(SerDeInfo other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetSerializationLib()) { + this.serializationLib = other.serializationLib; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + } + + public SerDeInfo deepCopy() { + return new SerDeInfo(this); + } + + @Override + public void clear() { + this.name = null; + this.serializationLib = null; + this.parameters = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + } + + public void setSerializationLib(String serializationLib) { + this.serializationLib = serializationLib; + } + + public void unsetSerializationLib() { + this.serializationLib = null; + } + + /** 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(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case SERIALIZATION_LIB: + if (value == null) { + unsetSerializationLib(); + } else { + setSerializationLib((String)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case SERIALIZATION_LIB: + return getSerializationLib(); + + case PARAMETERS: + return getParameters(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case SERIALIZATION_LIB: + return isSetSerializationLib(); + case PARAMETERS: + return isSetParameters(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SerDeInfo) + return this.equals((SerDeInfo)that); + return false; + } + + public boolean equals(SerDeInfo that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_serializationLib = true && this.isSetSerializationLib(); + boolean that_present_serializationLib = true && that.isSetSerializationLib(); + if (this_present_serializationLib || that_present_serializationLib) { + if (!(this_present_serializationLib && that_present_serializationLib)) + return false; + if (!this.serializationLib.equals(that.serializationLib)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SerDeInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SerDeInfo typedOther = (SerDeInfo)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerializationLib()).compareTo(typedOther.isSetSerializationLib()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerializationLib()) { + lastComparison = TBaseHelper.compareTo(this.serializationLib, typedOther.serializationLib); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // SERIALIZATION_LIB + if (field.type == TType.STRING) { + this.serializationLib = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map4 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) + { + String _key6; + String _val7; + _key6 = iprot.readString(); + _val7 = iprot.readString(); + this.parameters.put(_key6, _val7); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + if (this.serializationLib != null) { + oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); + oprot.writeString(this.serializationLib); + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter8 : this.parameters.entrySet()) + { + oprot.writeString(_iter8.getKey()); + oprot.writeString(_iter8.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SerDeInfo("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("serializationLib:"); + if (this.serializationLib == null) { + sb.append("null"); + } else { + sb.append(this.serializationLib); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java new file mode 100644 index 0000000..1fb3d62 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java @@ -0,0 +1,1250 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField OUTPUT_FORMAT_FIELD_DESC = new TField("outputFormat", TType.STRING, (short)4); + private static final TField COMPRESSED_FIELD_DESC = new TField("compressed", TType.BOOL, (short)5); + private static final TField NUM_BUCKETS_FIELD_DESC = new TField("numBuckets", TType.I32, (short)6); + private static final TField SERDE_INFO_FIELD_DESC = new TField("serdeInfo", TType.STRUCT, (short)7); + private static final TField BUCKET_COLS_FIELD_DESC = new TField("bucketCols", TType.LIST, (short)8); + private static final TField SORT_COLS_FIELD_DESC = new TField("sortCols", TType.LIST, (short)9); + private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)10); + + private List cols; + private String location; + private String inputFormat; + private String outputFormat; + private boolean compressed; + private int numBuckets; + private SerDeInfo serdeInfo; + private List bucketCols; + private List sortCols; + private Map parameters; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.INPUT_FORMAT, new FieldMetaData("inputFormat", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.OUTPUT_FORMAT, new FieldMetaData("outputFormat", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COMPRESSED, new FieldMetaData("compressed", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.NUM_BUCKETS, new FieldMetaData("numBuckets", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.SERDE_INFO, new FieldMetaData("serdeInfo", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, SerDeInfo.class))); + tmpMap.put(_Fields.BUCKET_COLS, new FieldMetaData("bucketCols", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.SORT_COLS, new FieldMetaData("sortCols", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Order.class)))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(StorageDescriptor.class, metaDataMap); + } + + public StorageDescriptor() { + } + + public StorageDescriptor( + List cols, + String location, + String inputFormat, + String outputFormat, + boolean compressed, + int numBuckets, + SerDeInfo serdeInfo, + List bucketCols, + List sortCols, + Map parameters) + { + this(); + this.cols = cols; + this.location = location; + this.inputFormat = inputFormat; + this.outputFormat = outputFormat; + this.compressed = compressed; + setCompressedIsSet(true); + this.numBuckets = numBuckets; + setNumBucketsIsSet(true); + this.serdeInfo = serdeInfo; + this.bucketCols = bucketCols; + this.sortCols = sortCols; + this.parameters = parameters; + } + + /** + * 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) { + __this__cols.add(new FieldSchema(other_element)); + } + this.cols = __this__cols; + } + if (other.isSetLocation()) { + this.location = other.location; + } + if (other.isSetInputFormat()) { + this.inputFormat = other.inputFormat; + } + if (other.isSetOutputFormat()) { + this.outputFormat = other.outputFormat; + } + this.compressed = other.compressed; + this.numBuckets = other.numBuckets; + if (other.isSetSerdeInfo()) { + this.serdeInfo = new SerDeInfo(other.serdeInfo); + } + if (other.isSetBucketCols()) { + List __this__bucketCols = new ArrayList(); + for (String other_element : other.bucketCols) { + __this__bucketCols.add(other_element); + } + this.bucketCols = __this__bucketCols; + } + if (other.isSetSortCols()) { + List __this__sortCols = new ArrayList(); + for (Order other_element : other.sortCols) { + __this__sortCols.add(new Order(other_element)); + } + this.sortCols = __this__sortCols; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + } + + public StorageDescriptor deepCopy() { + return new StorageDescriptor(this); + } + + @Override + public void clear() { + this.cols = null; + this.location = null; + this.inputFormat = null; + this.outputFormat = null; + setCompressedIsSet(false); + this.compressed = false; + setNumBucketsIsSet(false); + this.numBuckets = 0; + this.serdeInfo = null; + this.bucketCols = null; + this.sortCols = null; + this.parameters = null; + } + + public int getColsSize() { + return (this.cols == null) ? 0 : this.cols.size(); + } + + public java.util.Iterator getColsIterator() { + return (this.cols == null) ? null : this.cols.iterator(); + } + + public void addToCols(FieldSchema elem) { + if (this.cols == null) { + this.cols = new ArrayList(); + } + this.cols.add(elem); + } + + public List getCols() { + return this.cols; + } + + public void setCols(List cols) { + this.cols = cols; + } + + public void unsetCols() { + this.cols = null; + } + + /** 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; + } + + public void setLocation(String location) { + this.location = location; + } + + public void unsetLocation() { + this.location = null; + } + + /** 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; + } + + public void setInputFormat(String inputFormat) { + this.inputFormat = inputFormat; + } + + public void unsetInputFormat() { + this.inputFormat = null; + } + + /** 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; + } + + public void setOutputFormat(String outputFormat) { + this.outputFormat = outputFormat; + } + + public void unsetOutputFormat() { + this.outputFormat = null; + } + + /** 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; + setCompressedIsSet(true); + } + + public void unsetCompressed() { + __isset_bit_vector.clear(__COMPRESSED_ISSET_ID); + } + + /** Returns true if field compressed is set (has been asigned a value) and false otherwise */ + public boolean isSetCompressed() { + return __isset_bit_vector.get(__COMPRESSED_ISSET_ID); + } + + public void setCompressedIsSet(boolean value) { + __isset_bit_vector.set(__COMPRESSED_ISSET_ID, value); + } + + public int getNumBuckets() { + return this.numBuckets; + } + + public void setNumBuckets(int numBuckets) { + this.numBuckets = numBuckets; + setNumBucketsIsSet(true); + } + + public void unsetNumBuckets() { + __isset_bit_vector.clear(__NUMBUCKETS_ISSET_ID); + } + + /** Returns true if field numBuckets is set (has been asigned a value) and false otherwise */ + public boolean isSetNumBuckets() { + return __isset_bit_vector.get(__NUMBUCKETS_ISSET_ID); + } + + public void setNumBucketsIsSet(boolean value) { + __isset_bit_vector.set(__NUMBUCKETS_ISSET_ID, value); + } + + public SerDeInfo getSerdeInfo() { + return this.serdeInfo; + } + + public void setSerdeInfo(SerDeInfo serdeInfo) { + this.serdeInfo = serdeInfo; + } + + public void unsetSerdeInfo() { + this.serdeInfo = null; + } + + /** 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(); + } + + public java.util.Iterator getBucketColsIterator() { + return (this.bucketCols == null) ? null : this.bucketCols.iterator(); + } + + public void addToBucketCols(String elem) { + if (this.bucketCols == null) { + this.bucketCols = new ArrayList(); + } + this.bucketCols.add(elem); + } + + public List getBucketCols() { + return this.bucketCols; + } + + public void setBucketCols(List bucketCols) { + this.bucketCols = bucketCols; + } + + public void unsetBucketCols() { + this.bucketCols = null; + } + + /** 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(); + } + + public java.util.Iterator getSortColsIterator() { + return (this.sortCols == null) ? null : this.sortCols.iterator(); + } + + public void addToSortCols(Order elem) { + if (this.sortCols == null) { + this.sortCols = new ArrayList(); + } + this.sortCols.add(elem); + } + + public List getSortCols() { + return this.sortCols; + } + + public void setSortCols(List sortCols) { + this.sortCols = sortCols; + } + + public void unsetSortCols() { + this.sortCols = null; + } + + /** 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(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case COLS: + if (value == null) { + unsetCols(); + } else { + setCols((List)value); + } + break; + + case LOCATION: + if (value == null) { + unsetLocation(); + } else { + setLocation((String)value); + } + break; + + case INPUT_FORMAT: + if (value == null) { + unsetInputFormat(); + } else { + setInputFormat((String)value); + } + break; + + case OUTPUT_FORMAT: + if (value == null) { + unsetOutputFormat(); + } else { + setOutputFormat((String)value); + } + break; + + case COMPRESSED: + if (value == null) { + unsetCompressed(); + } else { + setCompressed((Boolean)value); + } + break; + + case NUM_BUCKETS: + if (value == null) { + unsetNumBuckets(); + } else { + setNumBuckets((Integer)value); + } + break; + + case SERDE_INFO: + if (value == null) { + unsetSerdeInfo(); + } else { + setSerdeInfo((SerDeInfo)value); + } + break; + + case BUCKET_COLS: + if (value == null) { + unsetBucketCols(); + } else { + setBucketCols((List)value); + } + break; + + case SORT_COLS: + if (value == null) { + unsetSortCols(); + } else { + setSortCols((List)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COLS: + return getCols(); + + case LOCATION: + return getLocation(); + + case INPUT_FORMAT: + return getInputFormat(); + + case OUTPUT_FORMAT: + return getOutputFormat(); + + case COMPRESSED: + return new Boolean(isCompressed()); + + case NUM_BUCKETS: + return new Integer(getNumBuckets()); + + case SERDE_INFO: + return getSerdeInfo(); + + case BUCKET_COLS: + return getBucketCols(); + + case SORT_COLS: + return getSortCols(); + + case PARAMETERS: + return getParameters(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COLS: + return isSetCols(); + case LOCATION: + return isSetLocation(); + case INPUT_FORMAT: + return isSetInputFormat(); + case OUTPUT_FORMAT: + return isSetOutputFormat(); + case COMPRESSED: + return isSetCompressed(); + case NUM_BUCKETS: + return isSetNumBuckets(); + case SERDE_INFO: + return isSetSerdeInfo(); + case BUCKET_COLS: + return isSetBucketCols(); + case SORT_COLS: + return isSetSortCols(); + case PARAMETERS: + return isSetParameters(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof StorageDescriptor) + return this.equals((StorageDescriptor)that); + return false; + } + + public boolean equals(StorageDescriptor that) { + if (that == null) + return false; + + boolean this_present_cols = true && this.isSetCols(); + boolean that_present_cols = true && that.isSetCols(); + if (this_present_cols || that_present_cols) { + if (!(this_present_cols && that_present_cols)) + return false; + if (!this.cols.equals(that.cols)) + return false; + } + + boolean this_present_location = true && this.isSetLocation(); + boolean that_present_location = true && that.isSetLocation(); + if (this_present_location || that_present_location) { + if (!(this_present_location && that_present_location)) + return false; + if (!this.location.equals(that.location)) + return false; + } + + boolean this_present_inputFormat = true && this.isSetInputFormat(); + boolean that_present_inputFormat = true && that.isSetInputFormat(); + if (this_present_inputFormat || that_present_inputFormat) { + if (!(this_present_inputFormat && that_present_inputFormat)) + return false; + if (!this.inputFormat.equals(that.inputFormat)) + return false; + } + + boolean this_present_outputFormat = true && this.isSetOutputFormat(); + boolean that_present_outputFormat = true && that.isSetOutputFormat(); + if (this_present_outputFormat || that_present_outputFormat) { + if (!(this_present_outputFormat && that_present_outputFormat)) + return false; + if (!this.outputFormat.equals(that.outputFormat)) + return false; + } + + boolean this_present_compressed = true; + boolean that_present_compressed = true; + if (this_present_compressed || that_present_compressed) { + if (!(this_present_compressed && that_present_compressed)) + return false; + if (this.compressed != that.compressed) + return false; + } + + boolean this_present_numBuckets = true; + boolean that_present_numBuckets = true; + if (this_present_numBuckets || that_present_numBuckets) { + if (!(this_present_numBuckets && that_present_numBuckets)) + return false; + if (this.numBuckets != that.numBuckets) + return false; + } + + boolean this_present_serdeInfo = true && this.isSetSerdeInfo(); + boolean that_present_serdeInfo = true && that.isSetSerdeInfo(); + if (this_present_serdeInfo || that_present_serdeInfo) { + if (!(this_present_serdeInfo && that_present_serdeInfo)) + return false; + if (!this.serdeInfo.equals(that.serdeInfo)) + return false; + } + + boolean this_present_bucketCols = true && this.isSetBucketCols(); + boolean that_present_bucketCols = true && that.isSetBucketCols(); + if (this_present_bucketCols || that_present_bucketCols) { + if (!(this_present_bucketCols && that_present_bucketCols)) + return false; + if (!this.bucketCols.equals(that.bucketCols)) + return false; + } + + boolean this_present_sortCols = true && this.isSetSortCols(); + boolean that_present_sortCols = true && that.isSetSortCols(); + if (this_present_sortCols || that_present_sortCols) { + if (!(this_present_sortCols && that_present_sortCols)) + return false; + if (!this.sortCols.equals(that.sortCols)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(StorageDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + StorageDescriptor typedOther = (StorageDescriptor)other; + + lastComparison = Boolean.valueOf(isSetCols()).compareTo(typedOther.isSetCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCols()) { + lastComparison = TBaseHelper.compareTo(this.cols, typedOther.cols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocation()).compareTo(typedOther.isSetLocation()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocation()) { + lastComparison = TBaseHelper.compareTo(this.location, typedOther.location); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInputFormat()).compareTo(typedOther.isSetInputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInputFormat()) { + lastComparison = TBaseHelper.compareTo(this.inputFormat, typedOther.inputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOutputFormat()).compareTo(typedOther.isSetOutputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOutputFormat()) { + lastComparison = TBaseHelper.compareTo(this.outputFormat, typedOther.outputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(typedOther.isSetCompressed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressed()) { + lastComparison = TBaseHelper.compareTo(this.compressed, typedOther.compressed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumBuckets()).compareTo(typedOther.isSetNumBuckets()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumBuckets()) { + lastComparison = TBaseHelper.compareTo(this.numBuckets, typedOther.numBuckets); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerdeInfo()).compareTo(typedOther.isSetSerdeInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerdeInfo()) { + lastComparison = TBaseHelper.compareTo(this.serdeInfo, typedOther.serdeInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBucketCols()).compareTo(typedOther.isSetBucketCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBucketCols()) { + lastComparison = TBaseHelper.compareTo(this.bucketCols, typedOther.bucketCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSortCols()).compareTo(typedOther.isSetSortCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSortCols()) { + lastComparison = TBaseHelper.compareTo(this.sortCols, typedOther.sortCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // COLS + if (field.type == TType.LIST) { + { + TList _list9 = iprot.readListBegin(); + this.cols = new ArrayList(_list9.size); + for (int _i10 = 0; _i10 < _list9.size; ++_i10) + { + FieldSchema _elem11; + _elem11 = new FieldSchema(); + _elem11.read(iprot); + this.cols.add(_elem11); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // LOCATION + if (field.type == TType.STRING) { + this.location = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INPUT_FORMAT + if (field.type == TType.STRING) { + this.inputFormat = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // OUTPUT_FORMAT + if (field.type == TType.STRING) { + this.outputFormat = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // COMPRESSED + if (field.type == TType.BOOL) { + this.compressed = iprot.readBool(); + setCompressedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // NUM_BUCKETS + if (field.type == TType.I32) { + this.numBuckets = iprot.readI32(); + setNumBucketsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // SERDE_INFO + if (field.type == TType.STRUCT) { + this.serdeInfo = new SerDeInfo(); + this.serdeInfo.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // BUCKET_COLS + if (field.type == TType.LIST) { + { + TList _list12 = iprot.readListBegin(); + this.bucketCols = new ArrayList(_list12.size); + for (int _i13 = 0; _i13 < _list12.size; ++_i13) + { + String _elem14; + _elem14 = iprot.readString(); + this.bucketCols.add(_elem14); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 9: // SORT_COLS + if (field.type == TType.LIST) { + { + TList _list15 = iprot.readListBegin(); + this.sortCols = new ArrayList(_list15.size); + for (int _i16 = 0; _i16 < _list15.size; ++_i16) + { + Order _elem17; + _elem17 = new Order(); + _elem17.read(iprot); + this.sortCols.add(_elem17); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 10: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map18 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map18.size); + for (int _i19 = 0; _i19 < _map18.size; ++_i19) + { + String _key20; + String _val21; + _key20 = iprot.readString(); + _val21 = iprot.readString(); + this.parameters.put(_key20, _val21); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.cols != null) { + oprot.writeFieldBegin(COLS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size())); + for (FieldSchema _iter22 : this.cols) + { + _iter22.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.location != null) { + oprot.writeFieldBegin(LOCATION_FIELD_DESC); + oprot.writeString(this.location); + oprot.writeFieldEnd(); + } + if (this.inputFormat != null) { + oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); + oprot.writeString(this.inputFormat); + oprot.writeFieldEnd(); + } + if (this.outputFormat != null) { + oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); + oprot.writeString(this.outputFormat); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); + oprot.writeBool(this.compressed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); + oprot.writeI32(this.numBuckets); + oprot.writeFieldEnd(); + if (this.serdeInfo != null) { + oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); + this.serdeInfo.write(oprot); + oprot.writeFieldEnd(); + } + if (this.bucketCols != null) { + oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size())); + for (String _iter23 : this.bucketCols) + { + oprot.writeString(_iter23); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.sortCols != null) { + oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size())); + for (Order _iter24 : this.sortCols) + { + _iter24.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter25 : this.parameters.entrySet()) + { + oprot.writeString(_iter25.getKey()); + oprot.writeString(_iter25.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("StorageDescriptor("); + boolean first = true; + + sb.append("cols:"); + if (this.cols == null) { + sb.append("null"); + } else { + sb.append(this.cols); + } + first = false; + if (!first) sb.append(", "); + sb.append("location:"); + if (this.location == null) { + sb.append("null"); + } else { + sb.append(this.location); + } + first = false; + if (!first) sb.append(", "); + sb.append("inputFormat:"); + if (this.inputFormat == null) { + sb.append("null"); + } else { + sb.append(this.inputFormat); + } + first = false; + if (!first) sb.append(", "); + sb.append("outputFormat:"); + if (this.outputFormat == null) { + sb.append("null"); + } else { + sb.append(this.outputFormat); + } + first = false; + if (!first) sb.append(", "); + sb.append("compressed:"); + sb.append(this.compressed); + first = false; + if (!first) sb.append(", "); + sb.append("numBuckets:"); + sb.append(this.numBuckets); + first = false; + if (!first) sb.append(", "); + sb.append("serdeInfo:"); + if (this.serdeInfo == null) { + sb.append("null"); + } else { + sb.append(this.serdeInfo); + } + first = false; + if (!first) sb.append(", "); + sb.append("bucketCols:"); + if (this.bucketCols == null) { + sb.append("null"); + } else { + sb.append(this.bucketCols); + } + first = false; + if (!first) sb.append(", "); + sb.append("sortCols:"); + if (this.sortCols == null) { + sb.append("null"); + } else { + sb.append(this.sortCols); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java new file mode 100644 index 0000000..a8943d5 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java @@ -0,0 +1,1346 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)4); + private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5); + private static final TField RETENTION_FIELD_DESC = new TField("retention", TType.I32, (short)6); + private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)7); + private static final TField PARTITION_KEYS_FIELD_DESC = new TField("partitionKeys", TType.LIST, (short)8); + private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)9); + private static final TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new TField("viewOriginalText", TType.STRING, (short)10); + private static final TField VIEW_EXPANDED_TEXT_FIELD_DESC = new TField("viewExpandedText", TType.STRING, (short)11); + private static final TField TABLE_TYPE_FIELD_DESC = new TField("tableType", TType.STRING, (short)12); + + private String tableName; + private String dbName; + private String owner; + private int createTime; + private int lastAccessTime; + private int retention; + private StorageDescriptor sd; + private List partitionKeys; + private Map parameters; + private String viewOriginalText; + private String viewExpandedText; + private String tableType; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.RETENTION, new FieldMetaData("retention", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARTITION_KEYS, new FieldMetaData("partitionKeys", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.VIEW_ORIGINAL_TEXT, new FieldMetaData("viewOriginalText", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.VIEW_EXPANDED_TEXT, new FieldMetaData("viewExpandedText", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_TYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); + } + + public Table() { + } + + public Table( + String tableName, + String dbName, + String owner, + int createTime, + int lastAccessTime, + int retention, + StorageDescriptor sd, + List partitionKeys, + Map parameters, + String viewOriginalText, + String viewExpandedText, + String tableType) + { + this(); + this.tableName = tableName; + this.dbName = dbName; + this.owner = owner; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.retention = retention; + setRetentionIsSet(true); + this.sd = sd; + this.partitionKeys = partitionKeys; + this.parameters = parameters; + this.viewOriginalText = viewOriginalText; + this.viewExpandedText = viewExpandedText; + this.tableType = tableType; + } + + /** + * 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; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetOwner()) { + this.owner = other.owner; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + this.retention = other.retention; + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetPartitionKeys()) { + List __this__partitionKeys = new ArrayList(); + for (FieldSchema other_element : other.partitionKeys) { + __this__partitionKeys.add(new FieldSchema(other_element)); + } + this.partitionKeys = __this__partitionKeys; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + if (other.isSetViewOriginalText()) { + this.viewOriginalText = other.viewOriginalText; + } + if (other.isSetViewExpandedText()) { + this.viewExpandedText = other.viewExpandedText; + } + if (other.isSetTableType()) { + this.tableType = other.tableType; + } + } + + public Table deepCopy() { + return new Table(this); + } + + @Override + public void clear() { + this.tableName = null; + this.dbName = null; + this.owner = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + setRetentionIsSet(false); + this.retention = 0; + this.sd = null; + this.partitionKeys = null; + this.parameters = null; + this.viewOriginalText = null; + this.viewExpandedText = null; + this.tableType = null; + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** 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; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** 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; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public void unsetOwner() { + this.owner = null; + } + + /** 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; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + } + + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ + public boolean isSetLastAccessTime() { + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + } + + public int getRetention() { + return this.retention; + } + + public void setRetention(int retention) { + this.retention = retention; + setRetentionIsSet(true); + } + + public void unsetRetention() { + __isset_bit_vector.clear(__RETENTION_ISSET_ID); + } + + /** Returns true if field retention is set (has been asigned a value) and false otherwise */ + public boolean isSetRetention() { + return __isset_bit_vector.get(__RETENTION_ISSET_ID); + } + + public void setRetentionIsSet(boolean value) { + __isset_bit_vector.set(__RETENTION_ISSET_ID, value); + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** 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(); + } + + public java.util.Iterator getPartitionKeysIterator() { + return (this.partitionKeys == null) ? null : this.partitionKeys.iterator(); + } + + public void addToPartitionKeys(FieldSchema elem) { + if (this.partitionKeys == null) { + this.partitionKeys = new ArrayList(); + } + this.partitionKeys.add(elem); + } + + public List getPartitionKeys() { + return this.partitionKeys; + } + + public void setPartitionKeys(List partitionKeys) { + this.partitionKeys = partitionKeys; + } + + public void unsetPartitionKeys() { + this.partitionKeys = null; + } + + /** 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(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** 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; + } + + public void setViewOriginalText(String viewOriginalText) { + this.viewOriginalText = viewOriginalText; + } + + public void unsetViewOriginalText() { + this.viewOriginalText = null; + } + + /** 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; + } + + public void setViewExpandedText(String viewExpandedText) { + this.viewExpandedText = viewExpandedText; + } + + public void unsetViewExpandedText() { + this.viewExpandedText = null; + } + + /** 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; + } + + public void setTableType(String tableType) { + this.tableType = tableType; + } + + public void unsetTableType() { + this.tableType = null; + } + + /** Returns true if field tableType is set (has been asigned a value) and false otherwise */ + public boolean isSetTableType() { + return this.tableType != null; + } + + 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 { + setTableName((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case RETENTION: + if (value == null) { + unsetRetention(); + } else { + setRetention((Integer)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARTITION_KEYS: + if (value == null) { + unsetPartitionKeys(); + } else { + setPartitionKeys((List)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case VIEW_ORIGINAL_TEXT: + if (value == null) { + unsetViewOriginalText(); + } else { + setViewOriginalText((String)value); + } + break; + + case VIEW_EXPANDED_TEXT: + if (value == null) { + unsetViewExpandedText(); + } else { + setViewExpandedText((String)value); + } + break; + + case TABLE_TYPE: + if (value == null) { + unsetTableType(); + } else { + setTableType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case DB_NAME: + return getDbName(); + + case OWNER: + return getOwner(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case LAST_ACCESS_TIME: + return new Integer(getLastAccessTime()); + + case RETENTION: + return new Integer(getRetention()); + + case SD: + return getSd(); + + case PARTITION_KEYS: + return getPartitionKeys(); + + case PARAMETERS: + return getParameters(); + + case VIEW_ORIGINAL_TEXT: + return getViewOriginalText(); + + case VIEW_EXPANDED_TEXT: + return getViewExpandedText(); + + case TABLE_TYPE: + return getTableType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case DB_NAME: + return isSetDbName(); + case OWNER: + return isSetOwner(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case RETENTION: + return isSetRetention(); + case SD: + return isSetSd(); + case PARTITION_KEYS: + return isSetPartitionKeys(); + case PARAMETERS: + return isSetParameters(); + case VIEW_ORIGINAL_TEXT: + return isSetViewOriginalText(); + case VIEW_EXPANDED_TEXT: + return isSetViewExpandedText(); + case TABLE_TYPE: + return isSetTableType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Table) + return this.equals((Table)that); + return false; + } + + public boolean equals(Table that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_owner = true && this.isSetOwner(); + boolean that_present_owner = true && that.isSetOwner(); + if (this_present_owner || that_present_owner) { + if (!(this_present_owner && that_present_owner)) + return false; + if (!this.owner.equals(that.owner)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_retention = true; + boolean that_present_retention = true; + if (this_present_retention || that_present_retention) { + if (!(this_present_retention && that_present_retention)) + return false; + if (this.retention != that.retention) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_partitionKeys = true && this.isSetPartitionKeys(); + boolean that_present_partitionKeys = true && that.isSetPartitionKeys(); + if (this_present_partitionKeys || that_present_partitionKeys) { + if (!(this_present_partitionKeys && that_present_partitionKeys)) + return false; + if (!this.partitionKeys.equals(that.partitionKeys)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_viewOriginalText = true && this.isSetViewOriginalText(); + boolean that_present_viewOriginalText = true && that.isSetViewOriginalText(); + if (this_present_viewOriginalText || that_present_viewOriginalText) { + if (!(this_present_viewOriginalText && that_present_viewOriginalText)) + return false; + if (!this.viewOriginalText.equals(that.viewOriginalText)) + return false; + } + + boolean this_present_viewExpandedText = true && this.isSetViewExpandedText(); + boolean that_present_viewExpandedText = true && that.isSetViewExpandedText(); + if (this_present_viewExpandedText || that_present_viewExpandedText) { + if (!(this_present_viewExpandedText && that_present_viewExpandedText)) + return false; + if (!this.viewExpandedText.equals(that.viewExpandedText)) + return false; + } + + boolean this_present_tableType = true && this.isSetTableType(); + boolean that_present_tableType = true && that.isSetTableType(); + if (this_present_tableType || that_present_tableType) { + if (!(this_present_tableType && that_present_tableType)) + return false; + if (!this.tableType.equals(that.tableType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Table other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Table typedOther = (Table)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = TBaseHelper.compareTo(this.owner, typedOther.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRetention()).compareTo(typedOther.isSetRetention()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRetention()) { + lastComparison = TBaseHelper.compareTo(this.retention, typedOther.retention); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionKeys()).compareTo(typedOther.isSetPartitionKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionKeys()) { + lastComparison = TBaseHelper.compareTo(this.partitionKeys, typedOther.partitionKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewOriginalText()).compareTo(typedOther.isSetViewOriginalText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewOriginalText()) { + lastComparison = TBaseHelper.compareTo(this.viewOriginalText, typedOther.viewOriginalText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewExpandedText()).compareTo(typedOther.isSetViewExpandedText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewExpandedText()) { + lastComparison = TBaseHelper.compareTo(this.viewExpandedText, typedOther.viewExpandedText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableType()).compareTo(typedOther.isSetTableType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableType()) { + lastComparison = TBaseHelper.compareTo(this.tableType, typedOther.tableType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DB_NAME + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // OWNER + if (field.type == TType.STRING) { + this.owner = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (field.type == TType.I32) { + this.lastAccessTime = iprot.readI32(); + setLastAccessTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // RETENTION + if (field.type == TType.I32) { + this.retention = iprot.readI32(); + setRetentionIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // SD + if (field.type == TType.STRUCT) { + this.sd = new StorageDescriptor(); + this.sd.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // PARTITION_KEYS + if (field.type == TType.LIST) { + { + TList _list26 = iprot.readListBegin(); + this.partitionKeys = new ArrayList(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) + { + FieldSchema _elem28; + _elem28 = new FieldSchema(); + _elem28.read(iprot); + this.partitionKeys.add(_elem28); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 9: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map29 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map29.size); + for (int _i30 = 0; _i30 < _map29.size; ++_i30) + { + String _key31; + String _val32; + _key31 = iprot.readString(); + _val32 = iprot.readString(); + this.parameters.put(_key31, _val32); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 10: // VIEW_ORIGINAL_TEXT + if (field.type == TType.STRING) { + this.viewOriginalText = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 11: // VIEW_EXPANDED_TEXT + if (field.type == TType.STRING) { + this.viewExpandedText = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 12: // TABLE_TYPE + if (field.type == TType.STRING) { + this.tableType = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.owner != null) { + oprot.writeFieldBegin(OWNER_FIELD_DESC); + oprot.writeString(this.owner); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(this.lastAccessTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RETENTION_FIELD_DESC); + oprot.writeI32(this.retention); + oprot.writeFieldEnd(); + if (this.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + this.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (this.partitionKeys != null) { + oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size())); + for (FieldSchema _iter33 : this.partitionKeys) + { + _iter33.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter34 : this.parameters.entrySet()) + { + oprot.writeString(_iter34.getKey()); + oprot.writeString(_iter34.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.viewOriginalText != null) { + oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); + oprot.writeString(this.viewOriginalText); + oprot.writeFieldEnd(); + } + if (this.viewExpandedText != null) { + oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); + oprot.writeString(this.viewExpandedText); + oprot.writeFieldEnd(); + } + if (this.tableType != null) { + oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); + oprot.writeString(this.tableType); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Table("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("retention:"); + sb.append(this.retention); + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionKeys:"); + if (this.partitionKeys == null) { + sb.append("null"); + } else { + sb.append(this.partitionKeys); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (!first) sb.append(", "); + sb.append("viewOriginalText:"); + if (this.viewOriginalText == null) { + sb.append("null"); + } else { + sb.append(this.viewOriginalText); + } + first = false; + if (!first) sb.append(", "); + sb.append("viewExpandedText:"); + if (this.viewExpandedText == null) { + sb.append("null"); + } else { + sb.append(this.viewExpandedText); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableType:"); + if (this.tableType == null) { + sb.append("null"); + } else { + sb.append(this.tableType); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java new file mode 100644 index 0000000..45f59b8 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -0,0 +1,38001 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class ThriftHiveMetastore { + + /** + * This interface is live. + */ + public interface Iface extends com.facebook.fb303.FacebookService.Iface { + + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException; + + public Database get_database(String name) throws NoSuchObjectException, MetaException, TException; + + public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException; + + public List get_databases(String pattern) throws MetaException, TException; + + public List get_all_databases() throws MetaException, TException; + + public Type get_type(String name) throws MetaException, NoSuchObjectException, TException; + + public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, TException; + + public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException; + + public Map get_type_all(String name) throws MetaException, TException; + + public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException; + + public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException; + + public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException; + + public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + public List get_tables(String db_name, String pattern) throws MetaException, TException; + + public List get_all_tables(String db_name) throws MetaException, TException; + + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException; + + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException; + + public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; + + public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; + + public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; + + public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, TException; + + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException; + + public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException; + + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException; + + public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; + + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; + + public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException; + + public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, TException; + + public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, TException; + + public List partition_name_to_vals(String part_name) throws MetaException, TException; + + public Map partition_name_to_spec(String part_name) throws MetaException, TException; + + public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, TException; + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, TException; + + public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, TException; + + public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, TException; + + public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException; + + } + + 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 alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, 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); + } + + public Client(TProtocol iprot, TProtocol oprot) + { + super(iprot, oprot); + } + + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException + { + send_create_database(database); + recv_create_database(); + } + + public void send_create_database(Database database) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, ++seqid_)); + create_database_args args = new create_database_args(); + args.setDatabase(database); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public Database get_database(String name) throws NoSuchObjectException, MetaException, TException + { + send_get_database(name); + return recv_get_database(); + } + + public void send_get_database(String name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, ++seqid_)); + get_database_args args = new get_database_args(); + args.setName(name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Database recv_get_database() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); + } + + public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException + { + send_drop_database(name, deleteData); + recv_drop_database(); + } + + public void send_drop_database(String name, boolean deleteData) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, ++seqid_)); + drop_database_args args = new drop_database_args(); + args.setName(name); + args.setDeleteData(deleteData); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public List get_databases(String pattern) throws MetaException, TException + { + send_get_databases(pattern); + return recv_get_databases(); + } + + public void send_get_databases(String pattern) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, ++seqid_)); + get_databases_args args = new get_databases_args(); + args.setPattern(pattern); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_databases() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); + } + + public List get_all_databases() throws MetaException, TException + { + send_get_all_databases(); + return recv_get_all_databases(); + } + + public void send_get_all_databases() throws TException + { + 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(); + oprot_.getTransport().flush(); + } + + public List recv_get_all_databases() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); + } + + public Type get_type(String name) throws MetaException, NoSuchObjectException, TException + { + send_get_type(name); + return recv_get_type(); + } + + public void send_get_type(String name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, ++seqid_)); + get_type_args args = new get_type_args(); + args.setName(name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Type recv_get_type() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); + } + + public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, TException + { + send_create_type(type); + return recv_create_type(); + } + + public void send_create_type(Type type) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, ++seqid_)); + create_type_args args = new create_type_args(); + args.setType(type); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_create_type() throws AlreadyExistsException, InvalidObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); + } + + public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException + { + send_drop_type(type); + return recv_drop_type(); + } + + public void send_drop_type(String type) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, ++seqid_)); + drop_type_args args = new drop_type_args(); + args.setType(type); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_drop_type() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); + } + + public Map get_type_all(String name) throws MetaException, TException + { + send_get_type_all(name); + return recv_get_type_all(); + } + + public void send_get_type_all(String name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, ++seqid_)); + get_type_all_args args = new get_type_all_args(); + args.setName(name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Map recv_get_type_all() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); + } + + public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException + { + send_get_fields(db_name, table_name); + return recv_get_fields(); + } + + public void send_get_fields(String db_name, String table_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, ++seqid_)); + get_fields_args args = new get_fields_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_fields() throws MetaException, UnknownTableException, UnknownDBException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); + } + + public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, TException + { + send_get_schema(db_name, table_name); + return recv_get_schema(); + } + + public void send_get_schema(String db_name, String table_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, ++seqid_)); + get_schema_args args = new get_schema_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_schema() throws MetaException, UnknownTableException, UnknownDBException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); + } + + public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException + { + send_create_table(tbl); + recv_create_table(); + } + + public void send_create_table(Table tbl) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, ++seqid_)); + create_table_args args = new create_table_args(); + args.setTbl(tbl); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_create_table() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + 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 void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException + { + send_drop_table(dbname, name, deleteData); + recv_drop_table(); + } + + public void send_drop_table(String dbname, String name, boolean deleteData) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, ++seqid_)); + drop_table_args args = new drop_table_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_drop_table() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public List get_tables(String db_name, String pattern) throws MetaException, TException + { + send_get_tables(db_name, pattern); + return recv_get_tables(); + } + + public void send_get_tables(String db_name, String pattern) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, ++seqid_)); + get_tables_args args = new get_tables_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_tables() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); + } + + public List get_all_tables(String db_name) throws MetaException, TException + { + send_get_all_tables(db_name); + return recv_get_all_tables(); + } + + public void send_get_all_tables(String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, ++seqid_)); + get_all_tables_args args = new get_all_tables_args(); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_all_tables() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); + } + + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException + { + send_get_table(dbname, tbl_name); + return recv_get_table(); + } + + public void send_get_table(String dbname, String tbl_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, ++seqid_)); + get_table_args args = new get_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Table recv_get_table() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); + } + + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException + { + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); + } + + public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws TException + { + oprot_.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, ++seqid_)); + alter_table_args args = new alter_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_alter_table() throws InvalidOperationException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + send_add_partition(new_part); + return recv_add_partition(); + } + + public void send_add_partition(Partition new_part) throws TException + { + oprot_.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, ++seqid_)); + add_partition_args args = new add_partition_args(); + args.setNew_part(new_part); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_add_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); + } + + public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + send_append_partition(db_name, tbl_name, part_vals); + return recv_append_partition(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_append_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); + } + + public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + send_append_partition_by_name(db_name, tbl_name, part_name); + return recv_append_partition_by_name(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_append_partition_by_name() throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); + } + + public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, TException + { + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_drop_partition() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); + } + + public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException + { + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_drop_partition_by_name() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + } + + public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, TException + { + send_get_partition(db_name, tbl_name, part_vals); + return recv_get_partition(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_get_partition() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); + } + + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException + { + send_get_partition_by_name(db_name, tbl_name, part_name); + return recv_get_partition_by_name(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_get_partition_by_name() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); + } + + public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException + { + send_get_partitions(db_name, tbl_name, max_parts); + return recv_get_partitions(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partitions() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); + } + + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException + { + send_get_partition_names(db_name, tbl_name, max_parts); + return recv_get_partition_names(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partition_names() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); + } + + public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException + { + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + return recv_get_partitions_ps(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partitions_ps() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); + } + + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException + { + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + return recv_get_partition_names_ps(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partition_names_ps() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + } + + public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException + { + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + return recv_get_partitions_by_filter(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partitions_by_filter() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + } + + public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, TException + { + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_alter_partition() throws InvalidOperationException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, TException + { + send_get_config_value(name, defaultValue); + return recv_get_config_value(); + } + + public void send_get_config_value(String name, String defaultValue) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, ++seqid_)); + get_config_value_args args = new get_config_value_args(); + args.setName(name); + args.setDefaultValue(defaultValue); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public String recv_get_config_value() throws ConfigValSecurityException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); + } + + public List partition_name_to_vals(String part_name) throws MetaException, TException + { + send_partition_name_to_vals(part_name); + return recv_partition_name_to_vals(); + } + + public void send_partition_name_to_vals(String part_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, ++seqid_)); + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.setPart_name(part_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_partition_name_to_vals() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + } + + public Map partition_name_to_spec(String part_name) throws MetaException, TException + { + send_partition_name_to_spec(part_name); + return recv_partition_name_to_spec(); + } + + public void send_partition_name_to_spec(String part_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, ++seqid_)); + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.setPart_name(part_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Map recv_partition_name_to_spec() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + } + + public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + send_add_index(new_index, index_table); + return recv_add_index(); + } + + public void send_add_index(Index new_index, Table index_table) throws TException + { + oprot_.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, ++seqid_)); + add_index_args args = new add_index_args(); + args.setNew_index(new_index); + args.setIndex_table(index_table); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Index recv_add_index() throws InvalidObjectException, AlreadyExistsException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); + } + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, TException + { + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); + } + + public void send_alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws TException + { + oprot_.writeMessageBegin(new TMessage("alter_index", TMessageType.CALL, ++seqid_)); + alter_index_args args = new alter_index_args(); + args.setDbname(dbname); + args.setBase_tbl_name(base_tbl_name); + args.setIdx_name(idx_name); + args.setNew_idx(new_idx); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_alter_index() throws InvalidOperationException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "alter_index failed: out of sequence response"); + } + alter_index_result result = new alter_index_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, TException + { + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_drop_index_by_name() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); + } + + public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, TException + { + send_get_index_by_name(db_name, tbl_name, index_name); + return recv_get_index_by_name(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Index recv_get_index_by_name() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); + } + + public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, TException + { + send_get_indexes(db_name, tbl_name, max_indexes); + return recv_get_indexes(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_indexes() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); + } + + public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException + { + send_get_index_names(db_name, tbl_name, max_indexes); + return recv_get_index_names(); + } + + 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_)); + 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(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_index_names() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + } + + } + 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); + } + } + + public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + 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); + } + + 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.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!"); + } + 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); + } + + 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.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!"); + } + 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); + } + + 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.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!"); + } + 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); + } + + 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.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_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 alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class alter_index_call extends TAsyncMethodCall { + private String dbname; + private String base_tbl_name; + private String idx_name; + private Index new_idx; + public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_index", TMessageType.CALL, 0)); + alter_index_args args = new alter_index_args(); + args.setDbname(dbname); + args.setBase_tbl_name(base_tbl_name); + args.setIdx_name(idx_name); + args.setNew_idx(new_idx); + 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_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("alter_index", new alter_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(); + } + + } + + private class get_all_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_databases_args args = new get_all_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_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 { + result.success = iface_.get_all_databases(); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_type_args args = new get_type_args(); + 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 { + result.success = iface_.get_type(args.name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type"); + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_type_args args = new create_type_args(); + 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.setSuccessIsSet(true); + } 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_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_type"); + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_type_args args = new drop_type_args(); + 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.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_type"); + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_type_all implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_type_all_args args = new get_type_all_args(); + 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 { + result.success = iface_.get_type_all(args.name); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_type_all", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type_all"); + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_fields implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_fields_args args = new get_fields_args(); + 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 { + result.success = iface_.get_fields(args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_fields", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_fields"); + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_schema implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_schema_args args = new get_schema_args(); + 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 { + result.success = iface_.get_schema(args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_schema", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_table_args args = new create_table_args(); + 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 { + iface_.create_table(args.tbl); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_table_args args = new drop_table_args(); + 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 { + iface_.drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_tables_args args = new get_tables_args(); + 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 { + result.success = iface_.get_tables(args.db_name, args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_all_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_tables_args args = new get_all_tables_args(); + 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 { + result.success = iface_.get_all_tables(args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_args args = new get_table_args(); + 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 { + result.success = iface_.get_table(args.dbname, args.tbl_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_table_args args = new alter_table_args(); + 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 { + iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_partition_args args = new add_partition_args(); + 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 { + result.success = iface_.add_partition(args.new_part); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_args args = new append_partition_args(); + 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 { + result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_by_name_args args = new append_partition_by_name_args(); + 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 { + result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_args args = new drop_partition_args(); + 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.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_by_name_args args = new drop_partition_by_name_args(); + 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.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_args args = new get_partition_args(); + 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 { + result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_by_name_args args = new get_partition_by_name_args(); + 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 { + result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_args args = new get_partitions_args(); + 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 { + result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_args args = new get_partition_names_args(); + 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 { + result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_ps_args args = new get_partitions_ps_args(); + 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 { + result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_ps_args args = new get_partition_names_ps_args(); + 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 { + result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_by_filter implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + 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 { + result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_by_filter", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_partition_args args = new alter_partition_args(); + 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 { + iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_config_value implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_config_value_args args = new get_config_value_args(); + 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 { + result.success = iface_.get_config_value(args.name, args.defaultValue); + } catch (ConfigValSecurityException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_config_value", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_vals implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_vals_args args = new partition_name_to_vals_args(); + 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 { + result.success = iface_.partition_name_to_vals(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_vals", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_spec implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_spec_args args = new partition_name_to_spec_args(); + 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 { + result.success = iface_.partition_name_to_spec(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_spec", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_index_args args = new add_index_args(); + 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 { + result.success = iface_.add_index(args.new_index, args.index_table); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_index_args args = new alter_index_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + alter_index_result result = new alter_index_result(); + try { + iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_index_by_name_args args = new drop_index_by_name_args(); + 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.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_index_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_index_by_name_args args = new get_index_by_name_args(); + 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 { + result.success = iface_.get_index_by_name(args.db_name, args.tbl_name, args.index_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_index_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_by_name"); + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_indexes implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_indexes_args args = new get_indexes_args(); + 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 { + result.success = iface_.get_indexes(args.db_name, args.tbl_name, args.max_indexes); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_indexes", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_indexes"); + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_index_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_index_names_args args = new get_index_names_args(); + 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 { + result.success = iface_.get_index_names(args.db_name, args.tbl_name, args.max_indexes); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_index_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_names"); + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public create_database_args() { + } + + public create_database_args( + Database database) + { + this(); + this.database = database; + } + + /** + * Performs a deep copy on other. + */ + public create_database_args(create_database_args other) { + if (other.isSetDatabase()) { + this.database = new Database(other.database); + } + } + + public create_database_args deepCopy() { + return new create_database_args(this); + } + + @Override + public void clear() { + this.database = null; + } + + public Database getDatabase() { + return this.database; + } + + public void setDatabase(Database database) { + this.database = database; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been asigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + 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(); + } else { + setDatabase((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATABASE: + return getDatabase(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DATABASE: + return isSetDatabase(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_args) + return this.equals((create_database_args)that); + return false; + } + + public boolean equals(create_database_args that) { + if (that == null) + return false; + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_args typedOther = (create_database_args)other; + + lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DATABASE + if (field.type == TType.STRUCT) { + this.database = new Database(); + this.database.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + this.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_database_args("); + boolean first = true; + + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + } + + public create_database_result() { + } + + public create_database_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_database_result(create_database_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_database_result deepCopy() { + return new create_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_result) + return this.equals((create_database_result)that); + return false; + } + + public boolean equals(create_database_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_result typedOther = (create_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_database_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + + private String name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public get_database_args() { + } + + public get_database_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_database_args(get_database_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_database_args deepCopy() { + return new get_database_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_args) + return this.equals((get_database_args)that); + return false; + } + + public boolean equals(get_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_args typedOther = (get_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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))); + 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(get_database_result.class, metaDataMap); + } + + public get_database_result() { + } + + public get_database_result( + Database success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_database_result(get_database_result other) { + if (other.isSetSuccess()) { + this.success = new Database(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_database_result deepCopy() { + return new get_database_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Database getSuccess() { + return this.success; + } + + public void setSuccess(Database success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Database)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_result) + return this.equals((get_database_result)that); + return false; + } + + public boolean equals(get_database_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_result typedOther = (get_database_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Database(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_database_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private boolean deleteData; + + /** 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; + } + } + + // 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); + } + + public drop_database_args() { + } + + public drop_database_args( + String name, + boolean deleteData) + { + this(); + this.name = name; + this.deleteData = deleteData; + 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; + } + this.deleteData = other.deleteData; + } + + public drop_database_args deepCopy() { + return new drop_database_args(this); + } + + @Override + public void clear() { + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_args) + return this.equals((drop_database_args)that); + return false; + } + + public boolean equals(drop_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_args typedOther = (drop_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidOperationException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); + } + + public drop_database_result() { + } + + public drop_database_result( + NoSuchObjectException o1, + InvalidOperationException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_database_result(drop_database_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_database_result deepCopy() { + return new drop_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_result) + return this.equals((drop_database_result)that); + return false; + } + + public boolean equals(drop_database_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_result typedOther = (drop_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidOperationException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public get_databases_args() { + } + + public get_databases_args( + String pattern) + { + this(); + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_args(get_databases_args other) { + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_databases_args deepCopy() { + return new get_databases_args(this); + } + + @Override + public void clear() { + this.pattern = null; + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + 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(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_databases_args) + return this.equals((get_databases_args)that); + return false; + } + + public boolean equals(get_databases_args that) { + if (that == null) + return false; + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_args typedOther = (get_databases_args)other; + + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PATTERN + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(this.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_databases_args("); + boolean first = true; + + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + } + + public get_databases_result() { + } + + public get_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_result(get_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_databases_result deepCopy() { + return new get_databases_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_databases_result) + return this.equals((get_databases_result)that); + return false; + } + + public boolean equals(get_databases_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_result typedOther = (get_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list58 = iprot.readListBegin(); + this.success = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) + { + String _elem60; + _elem60 = iprot.readString(); + this.success.add(_elem60); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter61 : this.success) + { + oprot.writeString(_iter61); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_databases_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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"); + + + + /** 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); + } + + public get_all_databases_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_args(get_all_databases_args other) { + } + + public get_all_databases_args deepCopy() { + return new get_all_databases_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_databases_args) + return this.equals((get_all_databases_args)that); + return false; + } + + public boolean equals(get_all_databases_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_args typedOther = (get_all_databases_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_databases_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); + } + + public get_all_databases_result() { + } + + public get_all_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_result(get_all_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_databases_result deepCopy() { + return new get_all_databases_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_databases_result) + return this.equals((get_all_databases_result)that); + return false; + } + + public boolean equals(get_all_databases_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_result typedOther = (get_all_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list62 = iprot.readListBegin(); + this.success = new ArrayList(_list62.size); + for (int _i63 = 0; _i63 < _list62.size; ++_i63) + { + String _elem64; + _elem64 = iprot.readString(); + this.success.add(_elem64); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter65 : this.success) + { + oprot.writeString(_iter65); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_databases_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public get_type_args() { + } + + public get_type_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_args(get_type_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_args deepCopy() { + return new get_type_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_args) + return this.equals((get_type_args)that); + return false; + } + + public boolean equals(get_type_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_args typedOther = (get_type_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(get_type_result.class, metaDataMap); + } + + public get_type_result() { + } + + public get_type_result( + Type success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_result(get_type_result other) { + if (other.isSetSuccess()) { + this.success = new Type(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_type_result deepCopy() { + return new get_type_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Type getSuccess() { + return this.success; + } + + public void setSuccess(Type success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Type)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_result) + return this.equals((get_type_result)that); + return false; + } + + public boolean equals(get_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + 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 _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Type(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public create_type_args() { + } + + public create_type_args( + Type type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public create_type_args(create_type_args other) { + if (other.isSetType()) { + this.type = new Type(other.type); + } + } + + public create_type_args deepCopy() { + return new create_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public Type getType() { + return this.type; + } + + public void setType(Type type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Type)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_args) + return this.equals((create_type_args)that); + return false; + } + + public boolean equals(create_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_args typedOther = (create_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TYPE + if (field.type == TType.STRUCT) { + this.type = new Type(); + this.type.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + this.type.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private AlreadyExistsException o1; + private InvalidObjectException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + } + + public create_type_result() { + } + + public create_type_result( + boolean success, + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_type_result(create_type_result other) { + __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); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_type_result deepCopy() { + return new create_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_result) + return this.equals((create_type_result)that); + return false; + } + + public boolean equals(create_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_result typedOther = (create_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_type_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public drop_type_args() { + } + + public drop_type_args( + String type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_args(drop_type_args other) { + if (other.isSetType()) { + this.type = other.type; + } + } + + public drop_type_args deepCopy() { + return new drop_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_args) + return this.equals((drop_type_args)that); + return false; + } + + public boolean equals(drop_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_args typedOther = (drop_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TYPE + if (field.type == TType.STRING) { + this.type = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(this.type); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(drop_type_result.class, metaDataMap); + } + + public drop_type_result() { + } + + public drop_type_result( + boolean success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_result(drop_type_result other) { + __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); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public drop_type_result deepCopy() { + return new drop_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_result) + return this.equals((drop_type_result)that); + return false; + } + + public boolean equals(drop_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_result typedOther = (drop_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_type_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public get_type_all_args() { + } + + public get_type_all_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_args(get_type_all_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_all_args deepCopy() { + return new get_type_all_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_args) + return this.equals((get_type_all_args)that); + return false; + } + + public boolean equals(get_type_all_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_all_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_args typedOther = (get_type_all_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_all_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o2; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + } + + public get_type_all_result() { + } + + public get_type_all_result( + Map success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_result(get_type_all_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + Type other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + Type __this__success_copy_value = new Type(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_type_all_result deepCopy() { + return new get_type_all_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, Type val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_result) + return this.equals((get_type_all_result)that); + return false; + } + + public boolean equals(get_type_all_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_all_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_result typedOther = (get_type_all_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.MAP) { + { + TMap _map66 = iprot.readMapBegin(); + this.success = new HashMap(2*_map66.size); + for (int _i67 = 0; _i67 < _map66.size; ++_i67) + { + String _key68; + Type _val69; + _key68 = iprot.readString(); + _val69 = new Type(); + _val69.read(iprot); + this.success.put(_key68, _val69); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); + for (Map.Entry _iter70 : this.success.entrySet()) + { + oprot.writeString(_iter70.getKey()); + _iter70.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_all_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + 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; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public get_fields_args() { + } + + public get_fields_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_args(get_fields_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_fields_args deepCopy() { + return new get_fields_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** 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 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(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_args) + return this.equals((get_fields_args)that); + return false; + } + + public boolean equals(get_fields_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_fields_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_args typedOther = (get_fields_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_fields_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private UnknownTableException o2; + private UnknownDBException o3; + + /** 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; + } + } + + // 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)))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + } + + public get_fields_result() { + } + + public get_fields_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_result(get_fields_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_fields_result deepCopy() { + return new get_fields_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_result) + return this.equals((get_fields_result)that); + return false; + } + + public boolean equals(get_fields_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_fields_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_result typedOther = (get_fields_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list71 = iprot.readListBegin(); + this.success = new ArrayList(_list71.size); + for (int _i72 = 0; _i72 < _list71.size; ++_i72) + { + FieldSchema _elem73; + _elem73 = new FieldSchema(); + _elem73.read(iprot); + this.success.add(_elem73); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new UnknownDBException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (FieldSchema _iter74 : this.success) + { + _iter74.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_fields_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public get_schema_args() { + } + + public get_schema_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_args(get_schema_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_schema_args deepCopy() { + return new get_schema_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** 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 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(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_args) + return this.equals((get_schema_args)that); + return false; + } + + public boolean equals(get_schema_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_schema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_args typedOther = (get_schema_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_schema_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private UnknownTableException o2; + private UnknownDBException o3; + + /** 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; + } + } + + // 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)))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); + } + + public get_schema_result() { + } + + public get_schema_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_result(get_schema_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_schema_result deepCopy() { + return new get_schema_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_result) + return this.equals((get_schema_result)that); + return false; + } + + public boolean equals(get_schema_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_schema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_result typedOther = (get_schema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list75 = iprot.readListBegin(); + this.success = new ArrayList(_list75.size); + for (int _i76 = 0; _i76 < _list75.size; ++_i76) + { + FieldSchema _elem77; + _elem77 = new FieldSchema(); + _elem77.read(iprot); + this.success.add(_elem77); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new UnknownDBException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (FieldSchema _iter78 : this.success) + { + _iter78.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_schema_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public create_table_args() { + } + + public create_table_args( + Table tbl) + { + this(); + this.tbl = tbl; + } + + /** + * Performs a deep copy on other. + */ + public create_table_args(create_table_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + } + + public create_table_args deepCopy() { + return new create_table_args(this); + } + + @Override + public void clear() { + this.tbl = null; + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + /** Returns true if field tbl is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; + } + + 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(); + } else { + setTbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TBL: + return getTbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TBL: + return isSetTbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_args) + return this.equals((create_table_args)that); + return false; + } + + public boolean equals(create_table_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_args typedOther = (create_table_args)other; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TBL + if (field.type == TType.STRUCT) { + this.tbl = new Table(); + this.tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + this.tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o2; + private MetaException o3; + private NoSuchObjectException o4; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + } + + public create_table_result() { + } + + public create_table_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_result(create_table_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_table_result deepCopy() { + return new create_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been asigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_result) + return this.equals((create_table_result)that); + return false; + } + + public boolean equals(create_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_result typedOther = (create_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == TType.STRUCT) { + this.o4 = new NoSuchObjectException(); + this.o4.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String name; + private boolean deleteData; + + /** 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; + } + } + + // 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))); + 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_table_args.class, metaDataMap); + } + + public drop_table_args() { + } + + public drop_table_args( + String dbname, + String name, + boolean deleteData) + { + this(); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + 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; + } + this.deleteData = other.deleteData; + } + + public drop_table_args deepCopy() { + return new drop_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** 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; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case NAME: + return getName(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_args) + return this.equals((drop_table_args)that); + return false; + } + + public boolean equals(drop_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_args typedOther = (drop_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o3; + + /** 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; + } + } + + // 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); + } + + public drop_table_result() { + } + + public drop_table_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_result(drop_table_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_table_result deepCopy() { + return new drop_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_result) + return this.equals((drop_table_result)that); + return false; + } + + public boolean equals(drop_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_result typedOther = (drop_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String pattern; + + /** 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; + } + } + + // 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); + } + + public get_tables_args() { + } + + public get_tables_args( + String db_name, + String pattern) + { + this(); + this.db_name = db_name; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_args(get_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_tables_args deepCopy() { + return new get_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.pattern = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + 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(); + } else { + setDb_name((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_args) + return this.equals((get_tables_args)that); + return false; + } + + public boolean equals(get_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_args typedOther = (get_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // PATTERN + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(this.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + } + + public get_tables_result() { + } + + public get_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_result(get_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_tables_result deepCopy() { + return new get_tables_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_result) + return this.equals((get_tables_result)that); + return false; + } + + public boolean equals(get_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @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; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list79 = iprot.readListBegin(); + this.success = new ArrayList(_list79.size); + for (int _i80 = 0; _i80 < _list79.size; ++_i80) + { + String _elem81; + _elem81 = iprot.readString(); + this.success.add(_elem81); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter82 : this.success) + { + oprot.writeString(_iter82); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public get_all_tables_args() { + } + + public get_all_tables_args( + String db_name) + { + this(); + this.db_name = db_name; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_args(get_all_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + } + + public get_all_tables_args deepCopy() { + return new get_all_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_args) + return this.equals((get_all_tables_args)that); + return false; + } + + public boolean equals(get_all_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_args typedOther = (get_all_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + } + + public get_all_tables_result() { + } + + public get_all_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_result(get_all_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_tables_result deepCopy() { + return new get_all_tables_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_result) + return this.equals((get_all_tables_result)that); + return false; + } + + public boolean equals(get_all_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_result typedOther = (get_all_tables_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list83 = iprot.readListBegin(); + this.success = new ArrayList(_list83.size); + for (int _i84 = 0; _i84 < _list83.size; ++_i84) + { + String _elem85; + _elem85 = iprot.readString(); + this.success.add(_elem85); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter86 : this.success) + { + oprot.writeString(_iter86); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + + private String dbname; + private String tbl_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public get_table_args() { + } + + public get_table_args( + String dbname, + String tbl_name) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public get_table_args(get_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public get_table_args deepCopy() { + return new get_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_args) + return this.equals((get_table_args)that); + return false; + } + + public boolean equals(get_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_args typedOther = (get_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(get_table_result.class, metaDataMap); + } + + public get_table_result() { + } + + public get_table_result( + Table success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_result(get_table_result other) { + if (other.isSetSuccess()) { + this.success = new Table(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_table_result deepCopy() { + return new get_table_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Table getSuccess() { + return this.success; + } + + public void setSuccess(Table success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Table)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_result) + return this.equals((get_table_result)that); + return false; + } + + public boolean equals(get_table_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_result typedOther = (get_table_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Table(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private Table new_tbl; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + } + + public alter_table_args() { + } + + public alter_table_args( + String dbname, + String tbl_name, + Table new_tbl) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_args(alter_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + } + + public alter_table_args deepCopy() { + return new alter_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + /** 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 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(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_args) + return this.equals((alter_table_args)that); + return false; + } + + public boolean equals(alter_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_args typedOther = (alter_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NEW_TBL + if (field.type == TType.STRUCT) { + this.new_tbl = new Table(); + this.new_tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + this.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o2; + + /** 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; + } + } + + // 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); + } + + public alter_table_result() { + } + + public alter_table_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_result(alter_table_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_table_result deepCopy() { + return new alter_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_result) + return this.equals((alter_table_result)that); + return false; + } + + public boolean equals(alter_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_result typedOther = (alter_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); + + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + + private Partition new_part; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NEW_PART((short)1, "new_part"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_PART + return NEW_PART; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public add_partition_args() { + } + + public add_partition_args( + Partition new_part) + { + this(); + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_args(add_partition_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public add_partition_args deepCopy() { + return new add_partition_args(this); + } + + @Override + public void clear() { + this.new_part = null; + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** 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 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(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_args) + return this.equals((add_partition_args)that); + return false; + } + + public boolean equals(add_partition_args that) { + if (that == null) + return false; + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_args typedOther = (add_partition_args)other; + + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NEW_PART + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_args("); + boolean first = true; + + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + } + + public add_partition_result() { + } + + public add_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_result(add_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partition_result deepCopy() { + return new add_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_result) + return this.equals((add_partition_result)that); + return false; + } + + public boolean equals(add_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_result typedOther = (add_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private List part_vals; + + /** 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; + } + } + + // 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); + } + + public append_partition_args() { + } + + public append_partition_args( + String db_name, + String tbl_name, + List part_vals) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_args(append_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + } + + public append_partition_args deepCopy() { + return new append_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_args) + return this.equals((append_partition_args)that); + return false; + } + + public boolean equals(append_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_args typedOther = (append_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list87 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list87.size); + for (int _i88 = 0; _i88 < _list87.size; ++_i88) + { + String _elem89; + _elem89 = iprot.readString(); + this.part_vals.add(_elem89); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter90 : this.part_vals) + { + oprot.writeString(_iter90); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + } + + public append_partition_result() { + } + + public append_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_result deepCopy() { + return new append_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_result) + return this.equals((append_partition_result)that); + return false; + } + + public boolean equals(append_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_result typedOther = (append_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + + private String db_name; + private String tbl_name; + private String part_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + } + + public append_partition_by_name_args() { + } + + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_args(append_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public append_partition_by_name_args deepCopy() { + return new append_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); + return false; + } + + public boolean equals(append_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_args typedOther = (append_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + } + + public append_partition_by_name_result() { + } + + public append_partition_by_name_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_result(append_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_by_name_result deepCopy() { + return new append_partition_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); + return false; + } + + public boolean equals(append_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_result typedOther = (append_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private List part_vals; + private boolean deleteData; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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_partition_args.class, metaDataMap); + } + + public drop_partition_args() { + } + + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + 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; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + this.deleteData = other.deleteData; + } + + public drop_partition_args deepCopy() { + return new drop_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** 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; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_args) + return this.equals((drop_partition_args)that); + return false; + } + + public boolean equals(drop_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_args typedOther = (drop_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list91 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list91.size); + for (int _i92 = 0; _i92 < _list91.size; ++_i92) + { + String _elem93; + _elem93 = iprot.readString(); + this.part_vals.add(_elem93); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter94 : this.part_vals) + { + oprot.writeString(_iter94); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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))); + 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(drop_partition_result.class, metaDataMap); + } + + public drop_partition_result() { + } + + public drop_partition_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_result(drop_partition_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_result deepCopy() { + return new drop_partition_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_result) + return this.equals((drop_partition_result)that); + return false; + } + + public boolean equals(drop_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_result typedOther = (drop_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private String part_name; + private boolean deleteData; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_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_partition_by_name_args.class, metaDataMap); + } + + public drop_partition_by_name_args() { + } + + public drop_partition_by_name_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + 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; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + this.deleteData = other.deleteData; + } + + public drop_partition_by_name_args deepCopy() { + return new drop_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** 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; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); + return false; + } + + public boolean equals(drop_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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))); + 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(drop_partition_by_name_result.class, metaDataMap); + } + + public drop_partition_by_name_result() { + } + + public drop_partition_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_result(drop_partition_by_name_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_by_name_result deepCopy() { + return new drop_partition_by_name_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_result) + return this.equals((drop_partition_by_name_result)that); + return false; + } + + public boolean equals(drop_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private List part_vals; + + /** 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; + } + } + + // 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); + } + + public get_partition_args() { + } + + public get_partition_args( + String db_name, + String tbl_name, + List part_vals) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_args(get_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + } + + public get_partition_args deepCopy() { + return new get_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_args) + return this.equals((get_partition_args)that); + return false; + } + + public boolean equals(get_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_args typedOther = (get_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list95 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list95.size); + for (int _i96 = 0; _i96 < _list95.size; ++_i96) + { + String _elem97; + _elem97 = iprot.readString(); + this.part_vals.add(_elem97); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter98 : this.part_vals) + { + oprot.writeString(_iter98); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(get_partition_result.class, metaDataMap); + } + + public get_partition_result() { + } + + public get_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_result(get_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_result deepCopy() { + return new get_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_result) + return this.equals((get_partition_result)that); + return false; + } + + public boolean equals(get_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_result typedOther = (get_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws 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; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); + } + + public get_partition_by_name_args() { + } + + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public get_partition_by_name_args deepCopy() { + return new get_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_by_name_args) + return this.equals((get_partition_by_name_args)that); + return false; + } + + public boolean equals(get_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_by_name_args typedOther = (get_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(get_partition_by_name_result.class, metaDataMap); + } + + public get_partition_by_name_result() { + } + + public get_partition_by_name_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_by_name_result(get_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_by_name_result deepCopy() { + return new get_partition_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_by_name_result) + return this.equals((get_partition_by_name_result)that); + return false; + } + + public boolean equals(get_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_by_name_result typedOther = (get_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); + } + + public get_partitions_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_args( + String db_name, + String tbl_name, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + 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; + } + this.max_parts = other.max_parts; + } + + public get_partitions_args deepCopy() { + return new get_partitions_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_args) + return this.equals((get_partitions_args)that); + return false; + } + + public boolean equals(get_partitions_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_args typedOther = (get_partitions_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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)))); + 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(get_partitions_result.class, metaDataMap); + } + + public get_partitions_result() { + } + + public get_partitions_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_result(get_partitions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_result deepCopy() { + return new get_partitions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_result) + return this.equals((get_partitions_result)that); + return false; + } + + public boolean equals(get_partitions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_result typedOther = (get_partitions_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list99 = iprot.readListBegin(); + this.success = new ArrayList(_list99.size); + for (int _i100 = 0; _i100 < _list99.size; ++_i100) + { + Partition _elem101; + _elem101 = new Partition(); + _elem101.read(iprot); + this.success.add(_elem101); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter102 : this.success) + { + _iter102.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + + private String db_name; + private String tbl_name; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); + } + + public get_partition_names_args() { + this.max_parts = (short)-1; + + } + + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + 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; + } + this.max_parts = other.max_parts; + } + + public get_partition_names_args deepCopy() { + return new get_partition_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_args) + return this.equals((get_partition_names_args)that); + return false; + } + + public boolean equals(get_partition_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_args typedOther = (get_partition_names_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o2; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); + } + + public get_partition_names_result() { + } + + public get_partition_names_result( + List success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_result(get_partition_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partition_names_result deepCopy() { + return new get_partition_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_result) + return this.equals((get_partition_names_result)that); + return false; + } + + public boolean equals(get_partition_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_result typedOther = (get_partition_names_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list103 = iprot.readListBegin(); + this.success = new ArrayList(_list103.size); + for (int _i104 = 0; _i104 < _list103.size; ++_i104) + { + String _elem105; + _elem105 = iprot.readString(); + this.success.add(_elem105); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter106 : this.success) + { + oprot.writeString(_iter106); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private List part_vals; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); + } + + public get_partitions_ps_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + 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; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + } + + public get_partitions_ps_args deepCopy() { + return new get_partitions_ps_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** 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; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); + return false; + } + + public boolean equals(get_partitions_ps_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_ps_args typedOther = (get_partitions_ps_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list107 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list107.size); + for (int _i108 = 0; _i108 < _list107.size; ++_i108) + { + String _elem109; + _elem109 = iprot.readString(); + this.part_vals.add(_elem109); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter110 : this.part_vals) + { + oprot.writeString(_iter110); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_ps_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); + } + + public get_partitions_ps_result() { + } + + public get_partitions_ps_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_result(get_partitions_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_partitions_ps_result deepCopy() { + return new get_partitions_ps_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); + return false; + } + + public boolean equals(get_partitions_ps_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_ps_result typedOther = (get_partitions_ps_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list111 = iprot.readListBegin(); + this.success = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + Partition _elem113; + _elem113 = new Partition(); + _elem113.read(iprot); + this.success.add(_elem113); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter114 : this.success) + { + _iter114.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_ps_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private List part_vals; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); + } + + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + + } + + public get_partition_names_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + 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; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + } + + public get_partition_names_ps_args deepCopy() { + return new get_partition_names_ps_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** 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; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); + return false; + } + + public boolean equals(get_partition_names_ps_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_names_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list115 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list115.size); + for (int _i116 = 0; _i116 < _list115.size; ++_i116) + { + String _elem117; + _elem117 = iprot.readString(); + this.part_vals.add(_elem117); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter118 : this.part_vals) + { + oprot.writeString(_iter118); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); + } + + public get_partition_names_ps_result() { + } + + public get_partition_names_ps_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_ps_result(get_partition_names_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_partition_names_ps_result deepCopy() { + return new get_partition_names_ps_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); + return false; + } + + public boolean equals(get_partition_names_ps_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partition_names_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list119 = iprot.readListBegin(); + this.success = new ArrayList(_list119.size); + for (int _i120 = 0; _i120 < _list119.size; ++_i120) + { + String _elem121; + _elem121 = iprot.readString(); + this.success.add(_elem121); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter122 : this.success) + { + oprot.writeString(_iter122); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private String filter; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); + } + + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_by_filter_args( + String db_name, + String tbl_name, + String filter, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + 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; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + this.max_parts = other.max_parts; + } + + public get_partitions_by_filter_args deepCopy() { + return new get_partitions_by_filter_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.filter = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** 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; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case FILTER: + return getFilter(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); + return false; + } + + public boolean equals(get_partitions_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // FILTER + if (field.type == TType.STRING) { + this.filter = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(this.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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)))); + 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(get_partitions_by_filter_result.class, metaDataMap); + } + + public get_partitions_by_filter_result() { + } + + public get_partitions_by_filter_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_filter_result(get_partitions_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_by_filter_result deepCopy() { + return new get_partitions_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); + return false; + } + + public boolean equals(get_partitions_by_filter_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_partitions_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list123 = iprot.readListBegin(); + this.success = new ArrayList(_list123.size); + for (int _i124 = 0; _i124 < _list123.size; ++_i124) + { + Partition _elem125; + _elem125 = new Partition(); + _elem125.read(iprot); + this.success.add(_elem125); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter126 : this.success) + { + _iter126.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private Partition new_part; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + 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; + } + } + + // 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); + } + + public alter_partition_args() { + } + + public alter_partition_args( + String db_name, + String tbl_name, + Partition new_part) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_args(alter_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public alter_partition_args deepCopy() { + return new alter_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_part = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** 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 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(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_args) + return this.equals((alter_partition_args)that); + return false; + } + + public boolean equals(alter_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_partition_args typedOther = (alter_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NEW_PART + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o2; + + /** 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; + } + } + + // 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); + } + + public alter_partition_result() { + } + + public alter_partition_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_result(alter_partition_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_partition_result deepCopy() { + return new alter_partition_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_result) + return this.equals((alter_partition_result)that); + return false; + } + + public boolean equals(alter_partition_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_partition_result typedOther = (alter_partition_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_partition_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String defaultValue; + + /** 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; + } + } + + // 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); + } + + public get_config_value_args() { + } + + public get_config_value_args( + String name, + String defaultValue) + { + this(); + this.name = name; + this.defaultValue = defaultValue; + } + + /** + * Performs a deep copy on other. + */ + public get_config_value_args(get_config_value_args other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; + } + } + + public get_config_value_args deepCopy() { + return new get_config_value_args(this); + } + + @Override + public void clear() { + this.name = null; + this.defaultValue = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public void unsetDefaultValue() { + this.defaultValue = null; + } + + /** Returns true if field defaultValue is set (has been asigned a value) and false otherwise */ + public boolean isSetDefaultValue() { + return this.defaultValue != null; + } + + 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(); + } else { + setName((String)value); + } + break; + + case DEFAULT_VALUE: + if (value == null) { + unsetDefaultValue(); + } else { + setDefaultValue((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DEFAULT_VALUE: + return getDefaultValue(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DEFAULT_VALUE: + return isSetDefaultValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_config_value_args) + return this.equals((get_config_value_args)that); + return false; + } + + public boolean equals(get_config_value_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_defaultValue = true && this.isSetDefaultValue(); + boolean that_present_defaultValue = true && that.isSetDefaultValue(); + if (this_present_defaultValue || that_present_defaultValue) { + if (!(this_present_defaultValue && that_present_defaultValue)) + return false; + if (!this.defaultValue.equals(that.defaultValue)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_config_value_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_config_value_args typedOther = (get_config_value_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultValue()) { + lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DEFAULT_VALUE + if (field.type == TType.STRING) { + this.defaultValue = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + if (this.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(this.defaultValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_config_value_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("defaultValue:"); + if (this.defaultValue == null) { + sb.append("null"); + } else { + sb.append(this.defaultValue); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private ConfigValSecurityException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + } + + public get_config_value_result() { + } + + public get_config_value_result( + String success, + ConfigValSecurityException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); + } + } + + public get_config_value_result deepCopy() { + return new get_config_value_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(ConfigValSecurityException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((ConfigValSecurityException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_config_value_result) + return this.equals((get_config_value_result)that); + return false; + } + + public boolean equals(get_config_value_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_config_value_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_config_value_result typedOther = (get_config_value_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRING) { + this.success = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new ConfigValSecurityException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_config_value_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public partition_name_to_vals_args() { + } + + public partition_name_to_vals_args( + String part_name) + { + this(); + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public partition_name_to_vals_args deepCopy() { + return new partition_name_to_vals_args(this); + } + + @Override + public void clear() { + this.part_name = null; + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_vals_args) + return this.equals((partition_name_to_vals_args)that); + return false; + } + + public boolean equals(partition_name_to_vals_args that) { + if (that == null) + return false; + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(partition_name_to_vals_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; + + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); + boolean first = true; + + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + } + + public partition_name_to_vals_result() { + } + + public partition_name_to_vals_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_vals_result(partition_name_to_vals_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public partition_name_to_vals_result deepCopy() { + return new partition_name_to_vals_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_vals_result) + return this.equals((partition_name_to_vals_result)that); + return false; + } + + public boolean equals(partition_name_to_vals_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(partition_name_to_vals_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list127 = iprot.readListBegin(); + this.success = new ArrayList(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) + { + String _elem129; + _elem129 = iprot.readString(); + this.success.add(_elem129); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter130 : this.success) + { + oprot.writeString(_iter130); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public partition_name_to_spec_args() { + } + + public partition_name_to_spec_args( + String part_name) + { + this(); + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_spec_args(partition_name_to_spec_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public partition_name_to_spec_args deepCopy() { + return new partition_name_to_spec_args(this); + } + + @Override + public void clear() { + this.part_name = null; + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); + return false; + } + + public boolean equals(partition_name_to_spec_args that) { + if (that == null) + return false; + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @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; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); + boolean first = true; + + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); + } + + public partition_name_to_spec_result() { + } + + public partition_name_to_spec_result( + Map success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_spec_result(partition_name_to_spec_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + String __this__success_copy_value = other_element_value; + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public partition_name_to_spec_result deepCopy() { + return new partition_name_to_spec_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); + return false; + } + + public boolean equals(partition_name_to_spec_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(partition_name_to_spec_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.MAP) { + { + TMap _map131 = iprot.readMapBegin(); + this.success = new HashMap(2*_map131.size); + for (int _i132 = 0; _i132 < _map131.size; ++_i132) + { + String _key133; + String _val134; + _key133 = iprot.readString(); + _val134 = iprot.readString(); + this.success.put(_key133, _val134); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); + for (Map.Entry _iter135 : this.success.entrySet()) + { + oprot.writeString(_iter135.getKey()); + oprot.writeString(_iter135.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private Table index_table; + + /** 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; + } + } + + // 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); + } + + public add_index_args() { + } + + public add_index_args( + Index new_index, + Table index_table) + { + this(); + this.new_index = new_index; + this.index_table = index_table; + } + + /** + * Performs a deep copy on other. + */ + public add_index_args(add_index_args other) { + if (other.isSetNew_index()) { + this.new_index = new Index(other.new_index); + } + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); + } + } + + public add_index_args deepCopy() { + return new add_index_args(this); + } + + @Override + public void clear() { + this.new_index = null; + this.index_table = null; + } + + public Index getNew_index() { + return this.new_index; + } + + public void setNew_index(Index new_index) { + this.new_index = new_index; + } + + public void unsetNew_index() { + this.new_index = null; + } + + /** 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; + } + + public void setIndex_table(Table index_table) { + this.index_table = index_table; + } + + public void unsetIndex_table() { + this.index_table = null; + } + + /** 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 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(); + } else { + setNew_index((Index)value); + } + break; + + case INDEX_TABLE: + if (value == null) { + unsetIndex_table(); + } else { + setIndex_table((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_INDEX: + return getNew_index(); + + case INDEX_TABLE: + return getIndex_table(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_index_args) + return this.equals((add_index_args)that); + return false; + } + + public boolean equals(add_index_args that) { + if (that == null) + return false; + + boolean this_present_new_index = true && this.isSetNew_index(); + boolean that_present_new_index = true && that.isSetNew_index(); + if (this_present_new_index || that_present_new_index) { + if (!(this_present_new_index && that_present_new_index)) + return false; + if (!this.new_index.equals(that.new_index)) + return false; + } + + boolean this_present_index_table = true && this.isSetIndex_table(); + boolean that_present_index_table = true && that.isSetIndex_table(); + if (this_present_index_table || that_present_index_table) { + if (!(this_present_index_table && that_present_index_table)) + return false; + if (!this.index_table.equals(that.index_table)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_index_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_index_args typedOther = (add_index_args)other; + + lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_index()) { + lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_table()) { + lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NEW_INDEX + if (field.type == TType.STRUCT) { + this.new_index = new Index(); + this.new_index.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // INDEX_TABLE + if (field.type == TType.STRUCT) { + this.index_table = new Table(); + this.index_table.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + this.new_index.write(oprot); + oprot.writeFieldEnd(); + } + if (this.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + this.index_table.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_index_args("); + boolean first = true; + + sb.append("new_index:"); + if (this.new_index == null) { + sb.append("null"); + } else { + sb.append(this.new_index); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_table:"); + if (this.index_table == null) { + sb.append("null"); + } else { + sb.append(this.index_table); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** 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; + } + } + + // 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))); + 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))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); + } + + public add_index_result() { + } + + public add_index_result( + Index success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_index_result(add_index_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_index_result deepCopy() { + return new add_index_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Index getSuccess() { + return this.success; + } + + public void setSuccess(Index success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Index)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_index_result) + return this.equals((add_index_result)that); + return false; + } + + public boolean equals(add_index_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_index_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_index_result typedOther = (add_index_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_index_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class alter_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField BASE_TBL_NAME_FIELD_DESC = new TField("base_tbl_name", TType.STRING, (short)2); + private static final TField IDX_NAME_FIELD_DESC = new TField("idx_name", TType.STRING, (short)3); + private static final TField NEW_IDX_FIELD_DESC = new TField("new_idx", TType.STRUCT, (short)4); + + private String dbname; + private String base_tbl_name; + private String idx_name; + private Index new_idx; + + /** 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"), + BASE_TBL_NAME((short)2, "base_tbl_name"), + IDX_NAME((short)3, "idx_name"), + NEW_IDX((short)4, "new_idx"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.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: // BASE_TBL_NAME + return BASE_TBL_NAME; + case 3: // IDX_NAME + return IDX_NAME; + case 4: // NEW_IDX + return NEW_IDX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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.BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); + } + + public alter_index_args() { + } + + public alter_index_args( + String dbname, + String base_tbl_name, + String idx_name, + Index new_idx) + { + this(); + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; + } + + /** + * Performs a deep copy on other. + */ + public alter_index_args(alter_index_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetBase_tbl_name()) { + this.base_tbl_name = other.base_tbl_name; + } + if (other.isSetIdx_name()) { + this.idx_name = other.idx_name; + } + if (other.isSetNew_idx()) { + this.new_idx = new Index(other.new_idx); + } + } + + public alter_index_args deepCopy() { + return new alter_index_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.base_tbl_name = null; + this.idx_name = null; + this.new_idx = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been 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 getBase_tbl_name() { + return this.base_tbl_name; + } + + public void setBase_tbl_name(String base_tbl_name) { + this.base_tbl_name = base_tbl_name; + } + + public void unsetBase_tbl_name() { + this.base_tbl_name = null; + } + + /** Returns true if field base_tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetBase_tbl_name() { + return this.base_tbl_name != null; + } + + public void setBase_tbl_nameIsSet(boolean value) { + if (!value) { + this.base_tbl_name = null; + } + } + + public String getIdx_name() { + return this.idx_name; + } + + public void setIdx_name(String idx_name) { + this.idx_name = idx_name; + } + + public void unsetIdx_name() { + this.idx_name = null; + } + + /** Returns true if field idx_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIdx_name() { + return this.idx_name != null; + } + + public void setIdx_nameIsSet(boolean value) { + if (!value) { + this.idx_name = null; + } + } + + public Index getNew_idx() { + return this.new_idx; + } + + public void setNew_idx(Index new_idx) { + this.new_idx = new_idx; + } + + public void unsetNew_idx() { + this.new_idx = null; + } + + /** Returns true if field new_idx is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_idx() { + return this.new_idx != null; + } + + public void setNew_idxIsSet(boolean value) { + if (!value) { + this.new_idx = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case BASE_TBL_NAME: + if (value == null) { + unsetBase_tbl_name(); + } else { + setBase_tbl_name((String)value); + } + break; + + case IDX_NAME: + if (value == null) { + unsetIdx_name(); + } else { + setIdx_name((String)value); + } + break; + + case NEW_IDX: + if (value == null) { + unsetNew_idx(); + } else { + setNew_idx((Index)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case BASE_TBL_NAME: + return getBase_tbl_name(); + + case IDX_NAME: + return getIdx_name(); + + case NEW_IDX: + return getNew_idx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case BASE_TBL_NAME: + return isSetBase_tbl_name(); + case IDX_NAME: + return isSetIdx_name(); + case NEW_IDX: + return isSetNew_idx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_index_args) + return this.equals((alter_index_args)that); + return false; + } + + public boolean equals(alter_index_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); + boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); + if (this_present_base_tbl_name || that_present_base_tbl_name) { + if (!(this_present_base_tbl_name && that_present_base_tbl_name)) + return false; + if (!this.base_tbl_name.equals(that.base_tbl_name)) + return false; + } + + boolean this_present_idx_name = true && this.isSetIdx_name(); + boolean that_present_idx_name = true && that.isSetIdx_name(); + if (this_present_idx_name || that_present_idx_name) { + if (!(this_present_idx_name && that_present_idx_name)) + return false; + if (!this.idx_name.equals(that.idx_name)) + return false; + } + + boolean this_present_new_idx = true && this.isSetNew_idx(); + boolean that_present_new_idx = true && that.isSetNew_idx(); + if (this_present_new_idx || that_present_new_idx) { + if (!(this_present_new_idx && that_present_new_idx)) + return false; + if (!this.new_idx.equals(that.new_idx)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_index_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_index_args typedOther = (alter_index_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(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBase_tbl_name()) { + lastComparison = TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIdx_name()) { + lastComparison = TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_idx()) { + lastComparison = TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // BASE_TBL_NAME + if (field.type == TType.STRING) { + this.base_tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IDX_NAME + if (field.type == TType.STRING) { + this.idx_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NEW_IDX + if (field.type == TType.STRUCT) { + this.new_idx = new Index(); + this.new_idx.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.base_tbl_name != null) { + oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); + oprot.writeString(this.base_tbl_name); + oprot.writeFieldEnd(); + } + if (this.idx_name != null) { + oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); + oprot.writeString(this.idx_name); + oprot.writeFieldEnd(); + } + if (this.new_idx != null) { + oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); + this.new_idx.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_index_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("base_tbl_name:"); + if (this.base_tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.base_tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("idx_name:"); + if (this.idx_name == null) { + sb.append("null"); + } else { + sb.append(this.idx_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_idx:"); + if (this.new_idx == null) { + sb.append("null"); + } else { + sb.append(this.new_idx); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class alter_index_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_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; + private MetaException o2; + + /** 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; + } + } + + // 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_index_result.class, metaDataMap); + } + + public alter_index_result() { + } + + public alter_index_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_index_result(alter_index_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_index_result deepCopy() { + return new alter_index_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_index_result) + return this.equals((alter_index_result)that); + return false; + } + + public boolean equals(alter_index_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_index_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_index_result typedOther = (alter_index_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_index_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private String index_name; + private boolean deleteData; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_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_index_by_name_args.class, metaDataMap); + } + + public drop_index_by_name_args() { + } + + public drop_index_by_name_args( + String db_name, + String tbl_name, + String index_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_args(drop_index_by_name_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + this.deleteData = other.deleteData; + } + + public drop_index_by_name_args deepCopy() { + return new drop_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been 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; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); + return false; + } + + public boolean equals(drop_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_index_by_name_args typedOther = (drop_index_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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))); + 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(drop_index_by_name_result.class, metaDataMap); + } + + public drop_index_by_name_result() { + } + + public drop_index_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_result(drop_index_by_name_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_result) + return this.equals((drop_index_by_name_result)that); + return false; + } + + public boolean equals(drop_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_index_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_index_by_name_result typedOther = (drop_index_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private String index_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"), + INDEX_NAME((short)3, "index_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); + } + + public get_index_by_name_args() { + } + + public get_index_by_name_args( + String db_name, + String tbl_name, + String index_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_args(get_index_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + } + + public get_index_by_name_args deepCopy() { + return new get_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_args) + return this.equals((get_index_by_name_args)that); + return false; + } + + public boolean equals(get_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_by_name_args typedOther = (get_index_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o1; + private NoSuchObjectException o2; + + /** 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; + } + } + + // 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))); + 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(get_index_by_name_result.class, metaDataMap); + } + + public get_index_by_name_result() { + } + + public get_index_by_name_result( + Index success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_result(get_index_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_index_by_name_result deepCopy() { + return new get_index_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Index getSuccess() { + return this.success; + } + + public void setSuccess(Index success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Index)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_result) + return this.equals((get_index_by_name_result)that); + return false; + } + + public boolean equals(get_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + 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 _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private short max_indexes; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + } + + public get_indexes_args() { + this.max_indexes = (short)-1; + + } + + public get_indexes_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_args(get_indexes_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_indexes_args deepCopy() { + return new get_indexes_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + } + + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return new Short(getMax_indexes()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_args) + return this.equals((get_indexes_args)that); + return false; + } + + public boolean equals(get_indexes_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_indexes_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_indexes_args typedOther = (get_indexes_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_INDEXES + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_indexes_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private NoSuchObjectException o1; + private MetaException o2; + + /** 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; + } + } + + // 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)))); + 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(get_indexes_result.class, metaDataMap); + } + + public get_indexes_result() { + } + + public get_indexes_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_result(get_indexes_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Index other_element : other.success) { + __this__success.add(new Index(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_indexes_result deepCopy() { + return new get_indexes_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Index elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_result) + return this.equals((get_indexes_result)that); + return false; + } + + public boolean equals(get_indexes_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_indexes_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_indexes_result typedOther = (get_indexes_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list136 = iprot.readListBegin(); + this.success = new ArrayList(_list136.size); + for (int _i137 = 0; _i137 < _list136.size; ++_i137) + { + Index _elem138; + _elem138 = new Index(); + _elem138.read(iprot); + this.success.add(_elem138); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Index _iter139 : this.success) + { + _iter139.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_indexes_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private String tbl_name; + private short max_indexes; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + } + + public get_index_names_args() { + this.max_indexes = (short)-1; + + } + + public get_index_names_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_args(get_index_names_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_index_names_args deepCopy() { + return new get_index_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been 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; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been 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; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + } + + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return new Short(getMax_indexes()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_args) + return this.equals((get_index_names_args)that); + return false; + } + + public boolean equals(get_index_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_index_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_names_args typedOther = (get_index_names_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_INDEXES + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private MetaException o2; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + } + + public get_index_names_result() { + } + + public get_index_names_result( + List success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_result(get_index_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_index_names_result deepCopy() { + return new get_index_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_result) + return this.equals((get_index_names_result)that); + return false; + } + + public boolean equals(get_index_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_index_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_names_result typedOther = (get_index_names_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list140 = iprot.readListBegin(); + this.success = new ArrayList(_list140.size); + for (int _i141 = 0; _i141 < _list140.size; ++_i141) + { + String _elem142; + _elem142 = iprot.readString(); + this.success.add(_elem142); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter143 : this.success) + { + oprot.writeString(_iter143); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + +} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java new file mode 100644 index 0000000..26d684a --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java @@ -0,0 +1,614 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private String type1; + private String type2; + private List fields; + + /** 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; + } + } + + // 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.TYPE1, new FieldMetaData("type1", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TYPE2, new FieldMetaData("type2", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FIELDS, new FieldMetaData("fields", TFieldRequirementType.OPTIONAL, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Type.class, metaDataMap); + } + + public Type() { + } + + public Type( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public Type(Type other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetType1()) { + this.type1 = other.type1; + } + if (other.isSetType2()) { + this.type2 = other.type2; + } + if (other.isSetFields()) { + List __this__fields = new ArrayList(); + for (FieldSchema other_element : other.fields) { + __this__fields.add(new FieldSchema(other_element)); + } + this.fields = __this__fields; + } + } + + public Type deepCopy() { + return new Type(this); + } + + @Override + public void clear() { + this.name = null; + this.type1 = null; + this.type2 = null; + this.fields = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** 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; + } + + public void setType1(String type1) { + this.type1 = type1; + } + + public void unsetType1() { + this.type1 = null; + } + + /** 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; + } + + public void setType2(String type2) { + this.type2 = type2; + } + + public void unsetType2() { + this.type2 = null; + } + + /** 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(); + } + + public java.util.Iterator getFieldsIterator() { + return (this.fields == null) ? null : this.fields.iterator(); + } + + public void addToFields(FieldSchema elem) { + if (this.fields == null) { + this.fields = new ArrayList(); + } + this.fields.add(elem); + } + + public List getFields() { + return this.fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public void unsetFields() { + this.fields = null; + } + + /** Returns true if field fields is set (has been asigned a value) and false otherwise */ + public boolean isSetFields() { + return this.fields != null; + } + + 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(); + } else { + setName((String)value); + } + break; + + case TYPE1: + if (value == null) { + unsetType1(); + } else { + setType1((String)value); + } + break; + + case TYPE2: + if (value == null) { + unsetType2(); + } else { + setType2((String)value); + } + break; + + case FIELDS: + if (value == null) { + unsetFields(); + } else { + setFields((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case TYPE1: + return getType1(); + + case TYPE2: + return getType2(); + + case FIELDS: + return getFields(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case TYPE1: + return isSetType1(); + case TYPE2: + return isSetType2(); + case FIELDS: + return isSetFields(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Type) + return this.equals((Type)that); + return false; + } + + public boolean equals(Type that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_type1 = true && this.isSetType1(); + boolean that_present_type1 = true && that.isSetType1(); + if (this_present_type1 || that_present_type1) { + if (!(this_present_type1 && that_present_type1)) + return false; + if (!this.type1.equals(that.type1)) + return false; + } + + boolean this_present_type2 = true && this.isSetType2(); + boolean that_present_type2 = true && that.isSetType2(); + if (this_present_type2 || that_present_type2) { + if (!(this_present_type2 && that_present_type2)) + return false; + if (!this.type2.equals(that.type2)) + return false; + } + + boolean this_present_fields = true && this.isSetFields(); + boolean that_present_fields = true && that.isSetFields(); + if (this_present_fields || that_present_fields) { + if (!(this_present_fields && that_present_fields)) + return false; + if (!this.fields.equals(that.fields)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Type other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Type typedOther = (Type)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType1()).compareTo(typedOther.isSetType1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType1()) { + lastComparison = TBaseHelper.compareTo(this.type1, typedOther.type1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType2()).compareTo(typedOther.isSetType2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType2()) { + lastComparison = TBaseHelper.compareTo(this.type2, typedOther.type2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFields()).compareTo(typedOther.isSetFields()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFields()) { + lastComparison = TBaseHelper.compareTo(this.fields, typedOther.fields); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TYPE1 + if (field.type == TType.STRING) { + this.type1 = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TYPE2 + if (field.type == TType.STRING) { + this.type2 = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // FIELDS + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.fields = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + FieldSchema _elem2; + _elem2 = new FieldSchema(); + _elem2.read(iprot); + this.fields.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + if (this.type1 != null) { + if (isSetType1()) { + oprot.writeFieldBegin(TYPE1_FIELD_DESC); + oprot.writeString(this.type1); + oprot.writeFieldEnd(); + } + } + if (this.type2 != null) { + if (isSetType2()) { + oprot.writeFieldBegin(TYPE2_FIELD_DESC); + oprot.writeString(this.type2); + oprot.writeFieldEnd(); + } + } + if (this.fields != null) { + if (isSetFields()) { + oprot.writeFieldBegin(FIELDS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.fields.size())); + for (FieldSchema _iter3 : this.fields) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Type("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (isSetType1()) { + if (!first) sb.append(", "); + sb.append("type1:"); + if (this.type1 == null) { + sb.append("null"); + } else { + sb.append(this.type1); + } + first = false; + } + if (isSetType2()) { + if (!first) sb.append(", "); + sb.append("type2:"); + if (this.type2 == null) { + sb.append("null"); + } else { + sb.append(this.type2); + } + first = false; + } + if (isSetFields()) { + if (!first) sb.append(", "); + sb.append("fields:"); + if (this.fields == null) { + sb.append("null"); + } else { + sb.append(this.fields); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java new file mode 100644 index 0000000..3422215 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public UnknownDBException() { + } + + public UnknownDBException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public UnknownDBException(UnknownDBException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public UnknownDBException deepCopy() { + return new UnknownDBException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnknownDBException) + return this.equals((UnknownDBException)that); + return false; + } + + public boolean equals(UnknownDBException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(UnknownDBException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + UnknownDBException typedOther = (UnknownDBException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("UnknownDBException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java new file mode 100644 index 0000000..4d39921 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java @@ -0,0 +1,306 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + + /** 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; + } + } + + // 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); + } + + public UnknownTableException() { + } + + public UnknownTableException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public UnknownTableException(UnknownTableException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public UnknownTableException deepCopy() { + return new UnknownTableException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been asigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnknownTableException) + return this.equals((UnknownTableException)that); + return false; + } + + public boolean equals(UnknownTableException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(UnknownTableException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + UnknownTableException typedOther = (UnknownTableException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("UnknownTableException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java new file mode 100644 index 0000000..8955d07 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java @@ -0,0 +1,394 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private String comments; + + /** 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; + } + } + + // 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); + } + + public Version() { + } + + public Version( + String version, + String comments) + { + this(); + this.version = version; + this.comments = comments; + } + + /** + * Performs a deep copy on other. + */ + public Version(Version other) { + if (other.isSetVersion()) { + this.version = other.version; + } + if (other.isSetComments()) { + this.comments = other.comments; + } + } + + public Version deepCopy() { + return new Version(this); + } + + @Override + public void clear() { + this.version = null; + this.comments = null; + } + + public String getVersion() { + return this.version; + } + + public void setVersion(String version) { + this.version = version; + } + + public void unsetVersion() { + this.version = null; + } + + /** 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; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public void unsetComments() { + this.comments = null; + } + + /** Returns true if field comments is set (has been asigned a value) and false otherwise */ + public boolean isSetComments() { + return this.comments != null; + } + + 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(); + } else { + setVersion((String)value); + } + break; + + case COMMENTS: + if (value == null) { + unsetComments(); + } else { + setComments((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VERSION: + return getVersion(); + + case COMMENTS: + return getComments(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VERSION: + return isSetVersion(); + case COMMENTS: + return isSetComments(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Version) + return this.equals((Version)that); + return false; + } + + public boolean equals(Version that) { + if (that == null) + return false; + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + + boolean this_present_comments = true && this.isSetComments(); + boolean that_present_comments = true && that.isSetComments(); + if (this_present_comments || that_present_comments) { + if (!(this_present_comments && that_present_comments)) + return false; + if (!this.comments.equals(that.comments)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Version other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Version typedOther = (Version)other; + + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(typedOther.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = TBaseHelper.compareTo(this.version, typedOther.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComments()).compareTo(typedOther.isSetComments()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComments()) { + lastComparison = TBaseHelper.compareTo(this.comments, typedOther.comments); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // VERSION + if (field.type == TType.STRING) { + this.version = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COMMENTS + if (field.type == TType.STRING) { + this.comments = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(this.version); + oprot.writeFieldEnd(); + } + if (this.comments != null) { + oprot.writeFieldBegin(COMMENTS_FIELD_DESC); + oprot.writeString(this.comments); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Version("); + boolean first = true; + + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); + sb.append("comments:"); + if (this.comments == null) { + sb.append("null"); + } else { + sb.append(this.comments); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php new file mode 100644 index 0000000..894379c --- /dev/null +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php @@ -0,0 +1,11172 @@ +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 alter_index($dbname, $base_tbl_name, $idx_name, $new_idx) + { + $this->send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx); + $this->recv_alter_index(); + } + + public function send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx) + { + $args = new metastore_ThriftHiveMetastore_alter_index_args(); + $args->dbname = $dbname; + $args->base_tbl_name = $base_tbl_name; + $args->idx_name = $idx_name; + $args->new_idx = $new_idx; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_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_alter_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_alter_index_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 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_alter_index_args { + static $_TSPEC; + + public $dbname = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'base_tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; + } + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_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::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->base_tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_idx = new metastore_Index(); + $xfer += $this->new_idx->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_index_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_index_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_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 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_index_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +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/thrift/gen-php/hive_metastore/hive_metastore_constants.php metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_constants.php new file mode 100644 index 0000000..5daa79a --- /dev/null +++ metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_constants.php @@ -0,0 +1,43 @@ + diff --git metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php new file mode 100644 index 0000000..1d5f4b4 --- /dev/null +++ metastore/src/gen/thrift/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/thrift/gen-py/__init__.py metastore/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote new file mode 100755 index 0000000..e4c096f --- /dev/null +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -0,0 +1,351 @@ +#!/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 ThriftHiveMetastore +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 create_database(Database database)' + print ' Database get_database(string name)' + print ' void drop_database(string name, bool deleteData)' + print ' get_databases(string pattern)' + print ' get_all_databases()' + print ' Type get_type(string name)' + print ' bool create_type(Type type)' + print ' bool drop_type(string type)' + print ' get_type_all(string name)' + print ' get_fields(string db_name, string table_name)' + print ' get_schema(string db_name, string table_name)' + print ' void create_table(Table tbl)' + print ' void drop_table(string dbname, string name, bool deleteData)' + print ' get_tables(string db_name, string pattern)' + print ' get_all_tables(string db_name)' + print ' Table get_table(string dbname, string tbl_name)' + print ' void alter_table(string dbname, string tbl_name, Table new_tbl)' + print ' Partition add_partition(Partition new_part)' + print ' Partition append_partition(string db_name, string tbl_name, part_vals)' + print ' Partition append_partition_by_name(string db_name, string tbl_name, string part_name)' + print ' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)' + print ' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)' + print ' Partition get_partition(string db_name, string tbl_name, part_vals)' + print ' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)' + print ' get_partitions(string db_name, string tbl_name, i16 max_parts)' + print ' get_partition_names(string db_name, string tbl_name, i16 max_parts)' + print ' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' + print ' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' + print ' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)' + print ' void alter_partition(string db_name, string tbl_name, Partition new_part)' + print ' string get_config_value(string name, string defaultValue)' + print ' partition_name_to_vals(string part_name)' + print ' partition_name_to_spec(string part_name)' + print ' Index add_index(Index new_index, Table index_table)' + print ' void alter_index(string dbname, string base_tbl_name, string idx_name, Index new_idx)' + print ' bool drop_index_by_name(string db_name, string tbl_name, string index_name, bool deleteData)' + print ' Index get_index_by_name(string db_name, string tbl_name, string index_name)' + print ' get_indexes(string db_name, string tbl_name, i16 max_indexes)' + print ' get_index_names(string db_name, string tbl_name, i16 max_indexes)' + print '' + 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] + if url[4]: + uri += '?%s' % url[4] + 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 = ThriftHiveMetastore.Client(protocol) +transport.open() + +if cmd == 'create_database': + if len(args) != 1: + print 'create_database requires 1 args' + sys.exit(1) + pp.pprint(client.create_database(eval(args[0]),)) + +elif cmd == 'get_database': + if len(args) != 1: + print 'get_database requires 1 args' + sys.exit(1) + pp.pprint(client.get_database(args[0],)) + +elif cmd == 'drop_database': + if len(args) != 2: + print 'drop_database requires 2 args' + sys.exit(1) + pp.pprint(client.drop_database(args[0],eval(args[1]),)) + +elif cmd == 'get_databases': + if len(args) != 1: + print 'get_databases requires 1 args' + sys.exit(1) + pp.pprint(client.get_databases(args[0],)) + +elif cmd == 'get_all_databases': + if len(args) != 0: + print 'get_all_databases requires 0 args' + sys.exit(1) + pp.pprint(client.get_all_databases()) + +elif cmd == 'get_type': + if len(args) != 1: + print 'get_type requires 1 args' + sys.exit(1) + pp.pprint(client.get_type(args[0],)) + +elif cmd == 'create_type': + if len(args) != 1: + print 'create_type requires 1 args' + sys.exit(1) + pp.pprint(client.create_type(eval(args[0]),)) + +elif cmd == 'drop_type': + if len(args) != 1: + print 'drop_type requires 1 args' + sys.exit(1) + pp.pprint(client.drop_type(args[0],)) + +elif cmd == 'get_type_all': + if len(args) != 1: + print 'get_type_all requires 1 args' + sys.exit(1) + pp.pprint(client.get_type_all(args[0],)) + +elif cmd == 'get_fields': + if len(args) != 2: + print 'get_fields requires 2 args' + sys.exit(1) + pp.pprint(client.get_fields(args[0],args[1],)) + +elif cmd == 'get_schema': + if len(args) != 2: + print 'get_schema requires 2 args' + sys.exit(1) + pp.pprint(client.get_schema(args[0],args[1],)) + +elif cmd == 'create_table': + if len(args) != 1: + print 'create_table requires 1 args' + sys.exit(1) + pp.pprint(client.create_table(eval(args[0]),)) + +elif cmd == 'drop_table': + if len(args) != 3: + print 'drop_table requires 3 args' + sys.exit(1) + pp.pprint(client.drop_table(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_tables': + if len(args) != 2: + print 'get_tables requires 2 args' + sys.exit(1) + pp.pprint(client.get_tables(args[0],args[1],)) + +elif cmd == 'get_all_tables': + if len(args) != 1: + print 'get_all_tables requires 1 args' + sys.exit(1) + pp.pprint(client.get_all_tables(args[0],)) + +elif cmd == 'get_table': + if len(args) != 2: + print 'get_table requires 2 args' + sys.exit(1) + pp.pprint(client.get_table(args[0],args[1],)) + +elif cmd == 'alter_table': + if len(args) != 3: + print 'alter_table requires 3 args' + sys.exit(1) + pp.pprint(client.alter_table(args[0],args[1],eval(args[2]),)) + +elif cmd == 'add_partition': + if len(args) != 1: + print 'add_partition requires 1 args' + sys.exit(1) + pp.pprint(client.add_partition(eval(args[0]),)) + +elif cmd == 'append_partition': + if len(args) != 3: + print 'append_partition requires 3 args' + sys.exit(1) + pp.pprint(client.append_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'append_partition_by_name': + if len(args) != 3: + print 'append_partition_by_name requires 3 args' + sys.exit(1) + pp.pprint(client.append_partition_by_name(args[0],args[1],args[2],)) + +elif cmd == 'drop_partition': + if len(args) != 4: + print 'drop_partition requires 4 args' + sys.exit(1) + pp.pprint(client.drop_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'drop_partition_by_name': + if len(args) != 4: + print 'drop_partition_by_name requires 4 args' + sys.exit(1) + pp.pprint(client.drop_partition_by_name(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_partition': + if len(args) != 3: + print 'get_partition requires 3 args' + sys.exit(1) + pp.pprint(client.get_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partition_by_name': + if len(args) != 3: + print 'get_partition_by_name requires 3 args' + sys.exit(1) + pp.pprint(client.get_partition_by_name(args[0],args[1],args[2],)) + +elif cmd == 'get_partitions': + if len(args) != 3: + print 'get_partitions requires 3 args' + sys.exit(1) + pp.pprint(client.get_partitions(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partition_names': + if len(args) != 3: + print 'get_partition_names requires 3 args' + sys.exit(1) + pp.pprint(client.get_partition_names(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partitions_ps': + if len(args) != 4: + print 'get_partitions_ps requires 4 args' + sys.exit(1) + pp.pprint(client.get_partitions_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'get_partition_names_ps': + if len(args) != 4: + print 'get_partition_names_ps requires 4 args' + sys.exit(1) + pp.pprint(client.get_partition_names_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'get_partitions_by_filter': + if len(args) != 4: + print 'get_partitions_by_filter requires 4 args' + sys.exit(1) + pp.pprint(client.get_partitions_by_filter(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'alter_partition': + if len(args) != 3: + print 'alter_partition requires 3 args' + sys.exit(1) + pp.pprint(client.alter_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_config_value': + if len(args) != 2: + print 'get_config_value requires 2 args' + sys.exit(1) + pp.pprint(client.get_config_value(args[0],args[1],)) + +elif cmd == 'partition_name_to_vals': + if len(args) != 1: + print 'partition_name_to_vals requires 1 args' + sys.exit(1) + pp.pprint(client.partition_name_to_vals(args[0],)) + +elif cmd == 'partition_name_to_spec': + if len(args) != 1: + print 'partition_name_to_spec requires 1 args' + sys.exit(1) + pp.pprint(client.partition_name_to_spec(args[0],)) + +elif cmd == 'add_index': + if len(args) != 2: + print 'add_index requires 2 args' + sys.exit(1) + pp.pprint(client.add_index(eval(args[0]),eval(args[1]),)) + +elif cmd == 'alter_index': + if len(args) != 4: + print 'alter_index requires 4 args' + sys.exit(1) + pp.pprint(client.alter_index(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'drop_index_by_name': + if len(args) != 4: + print 'drop_index_by_name requires 4 args' + sys.exit(1) + pp.pprint(client.drop_index_by_name(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_index_by_name': + if len(args) != 3: + print 'get_index_by_name requires 3 args' + sys.exit(1) + pp.pprint(client.get_index_by_name(args[0],args[1],args[2],)) + +elif cmd == 'get_indexes': + if len(args) != 3: + print 'get_indexes requires 3 args' + sys.exit(1) + pp.pprint(client.get_indexes(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_index_names': + if len(args) != 3: + print 'get_index_names requires 3 args' + sys.exit(1) + pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) + +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + +transport.close() diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py new file mode 100644 index 0000000..88d3cd8 --- /dev/null +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -0,0 +1,8734 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +import fb303.FacebookService +from ttypes import * +from thrift.Thrift import TProcessor +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class Iface(fb303.FacebookService.Iface): + """ + This interface is live. + """ + def create_database(self, database): + """ + Parameters: + - database + """ + pass + + def get_database(self, name): + """ + Parameters: + - name + """ + pass + + def drop_database(self, name, deleteData): + """ + Parameters: + - name + - deleteData + """ + pass + + def get_databases(self, pattern): + """ + Parameters: + - pattern + """ + pass + + def get_all_databases(self, ): + pass + + def get_type(self, name): + """ + Parameters: + - name + """ + pass + + def create_type(self, type): + """ + Parameters: + - type + """ + pass + + def drop_type(self, type): + """ + Parameters: + - type + """ + pass + + def get_type_all(self, name): + """ + Parameters: + - name + """ + pass + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + pass + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + pass + + def create_table(self, tbl): + """ + Parameters: + - tbl + """ + pass + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + """ + pass + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + """ + pass + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + """ + pass + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + """ + pass + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + """ + pass + + def add_partition(self, new_part): + """ + Parameters: + - new_part + """ + pass + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + pass + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + pass + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + """ + pass + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + """ + pass + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + pass + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + pass + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + pass + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + pass + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + pass + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + pass + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + pass + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + """ + pass + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + """ + pass + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + """ + pass + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + """ + pass + + def add_index(self, new_index, index_table): + """ + Parameters: + - new_index + - index_table + """ + pass + + def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + """ + Parameters: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + pass + + def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - index_name + - deleteData + """ + pass + + def get_index_by_name(self, db_name, tbl_name, index_name): + """ + Parameters: + - db_name + - tbl_name + - index_name + """ + pass + + def get_indexes(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + pass + + def get_index_names(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + pass + + +class Client(fb303.FacebookService.Client, Iface): + """ + This interface is live. + """ + def __init__(self, iprot, oprot=None): + fb303.FacebookService.Client.__init__(self, iprot, oprot) + + def create_database(self, database): + """ + Parameters: + - database + """ + self.send_create_database(database) + self.recv_create_database() + + def send_create_database(self, database): + self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid) + args = create_database_args() + args.database = database + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_database(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_database_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + return + + def get_database(self, name): + """ + Parameters: + - name + """ + self.send_get_database(name) + return self.recv_get_database() + + def send_get_database(self, name): + self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid) + args = get_database_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_database(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_database_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); + + def drop_database(self, name, deleteData): + """ + Parameters: + - name + - deleteData + """ + self.send_drop_database(name, deleteData) + self.recv_drop_database() + + def send_drop_database(self, name, deleteData): + self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid) + args = drop_database_args() + args.name = name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_database(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_database_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + return + + def get_databases(self, pattern): + """ + Parameters: + - pattern + """ + self.send_get_databases(pattern) + return self.recv_get_databases() + + def send_get_databases(self, pattern): + self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid) + args = get_databases_args() + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_databases(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_databases_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); + + def get_all_databases(self, ): + self.send_get_all_databases() + return self.recv_get_all_databases() + + def send_get_all_databases(self, ): + self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid) + args = get_all_databases_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_databases(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_all_databases_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); + + def get_type(self, name): + """ + Parameters: + - name + """ + self.send_get_type(name) + return self.recv_get_type() + + def send_get_type(self, name): + self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid) + args = get_type_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_type_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); + + def create_type(self, type): + """ + Parameters: + - type + """ + self.send_create_type(type) + return self.recv_create_type() + + def send_create_type(self, type): + self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid) + args = create_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_type(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_type_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); + + def drop_type(self, type): + """ + Parameters: + - type + """ + self.send_drop_type(type) + return self.recv_drop_type() + + def send_drop_type(self, type): + self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid) + args = drop_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_type(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_type_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); + + def get_type_all(self, name): + """ + Parameters: + - name + """ + self.send_get_type_all(name) + return self.recv_get_type_all() + + def send_get_type_all(self, name): + self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid) + args = get_type_all_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type_all(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_type_all_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + self.send_get_fields(db_name, table_name) + return self.recv_get_fields() + + def send_get_fields(self, db_name, table_name): + self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid) + args = get_fields_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_fields_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + self.send_get_schema(db_name, table_name) + return self.recv_get_schema() + + def send_get_schema(self, db_name, table_name): + self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid) + args = get_schema_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_schema_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); + + def create_table(self, tbl): + """ + Parameters: + - tbl + """ + self.send_create_table(tbl) + self.recv_create_table() + + def send_create_table(self, tbl): + self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid) + args = create_table_args() + args.tbl = tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + if result.o4 != None: + raise result.o4 + return + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + """ + self.send_drop_table(dbname, name, deleteData) + self.recv_drop_table() + + def send_drop_table(self, dbname, name, deleteData): + self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid) + args = drop_table_args() + args.dbname = dbname + args.name = name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o3 != None: + raise result.o3 + return + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + """ + self.send_get_tables(db_name, pattern) + return self.recv_get_tables() + + def send_get_tables(self, db_name, pattern): + self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid) + args = get_tables_args() + args.db_name = db_name + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_tables_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + """ + self.send_get_all_tables(db_name) + return self.recv_get_all_tables() + + def send_get_all_tables(self, db_name): + self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid) + args = get_all_tables_args() + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_tables(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_all_tables_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + """ + self.send_get_table(dbname, tbl_name) + return self.recv_get_table() + + def send_get_table(self, dbname, tbl_name): + self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid) + args = get_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + """ + self.send_alter_table(dbname, tbl_name, new_tbl) + self.recv_alter_table() + + def send_alter_table(self, dbname, tbl_name, new_tbl): + self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid) + args = alter_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = alter_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + return + + def add_partition(self, new_part): + """ + Parameters: + - new_part + """ + self.send_add_partition(new_part) + return self.recv_add_partition() + + def send_add_partition(self, new_part): + self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid) + args = add_partition_args() + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = add_partition_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + self.send_append_partition(db_name, tbl_name, part_vals) + return self.recv_append_partition() + + def send_append_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid) + args = append_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = append_partition_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + self.send_append_partition_by_name(db_name, tbl_name, part_name) + return self.recv_append_partition_by_name() + + def send_append_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin('append_partition_by_name', TMessageType.CALL, self._seqid) + args = append_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_by_name(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = append_partition_by_name_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + """ + self.send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return self.recv_drop_partition() + + def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData): + self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid) + args = drop_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_partition_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + """ + self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return self.recv_drop_partition_by_name() + + def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + self._oprot.writeMessageBegin('drop_partition_by_name', TMessageType.CALL, self._seqid) + args = drop_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_by_name(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_partition_by_name_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + self.send_get_partition(db_name, tbl_name, part_vals) + return self.recv_get_partition() + + def send_get_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid) + args = get_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + self.send_get_partition_by_name(db_name, tbl_name, part_name) + return self.recv_get_partition_by_name() + + def send_get_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin('get_partition_by_name', TMessageType.CALL, self._seqid) + args = get_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_by_name(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_by_name_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + self.send_get_partitions(db_name, tbl_name, max_parts) + return self.recv_get_partitions() + + def send_get_partitions(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid) + args = get_partitions_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + self.send_get_partition_names(db_name, tbl_name, max_parts) + return self.recv_get_partition_names() + + def send_get_partition_names(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid) + args = get_partition_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_names_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partitions_ps() + + def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin('get_partitions_ps', TMessageType.CALL, self._seqid) + args = 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.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_ps_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partition_names_ps() + + def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin('get_partition_names_ps', TMessageType.CALL, self._seqid) + args = 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.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names_ps(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_names_ps_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return self.recv_get_partitions_by_filter() + + def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + self._oprot.writeMessageBegin('get_partitions_by_filter', TMessageType.CALL, self._seqid) + args = get_partitions_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_filter(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_by_filter_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + """ + self.send_alter_partition(db_name, tbl_name, new_part) + self.recv_alter_partition() + + def send_alter_partition(self, db_name, tbl_name, new_part): + self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid) + args = alter_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = alter_partition_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + return + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + """ + self.send_get_config_value(name, defaultValue) + return self.recv_get_config_value() + + def send_get_config_value(self, name, defaultValue): + self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid) + args = get_config_value_args() + args.name = name + args.defaultValue = defaultValue + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_config_value(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_config_value_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + """ + self.send_partition_name_to_vals(part_name) + return self.recv_partition_name_to_vals() + + def send_partition_name_to_vals(self, part_name): + self._oprot.writeMessageBegin('partition_name_to_vals', TMessageType.CALL, self._seqid) + args = partition_name_to_vals_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_vals(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = partition_name_to_vals_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + """ + self.send_partition_name_to_spec(part_name) + return self.recv_partition_name_to_spec() + + def send_partition_name_to_spec(self, part_name): + self._oprot.writeMessageBegin('partition_name_to_spec', TMessageType.CALL, self._seqid) + args = partition_name_to_spec_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_spec(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = partition_name_to_spec_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + + def add_index(self, new_index, index_table): + """ + Parameters: + - new_index + - index_table + """ + self.send_add_index(new_index, index_table) + return self.recv_add_index() + + def send_add_index(self, new_index, index_table): + self._oprot.writeMessageBegin('add_index', TMessageType.CALL, self._seqid) + args = add_index_args() + args.new_index = new_index + args.index_table = index_table + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_index(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = add_index_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + if result.o3 != None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); + + def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + """ + Parameters: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + self.send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + self.recv_alter_index() + + def send_alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + self._oprot.writeMessageBegin('alter_index', TMessageType.CALL, self._seqid) + args = alter_index_args() + args.dbname = dbname + args.base_tbl_name = base_tbl_name + args.idx_name = idx_name + args.new_idx = new_idx + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_index(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = alter_index_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + return + + def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - index_name + - deleteData + """ + self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + return self.recv_drop_index_by_name() + + def send_drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + self._oprot.writeMessageBegin('drop_index_by_name', TMessageType.CALL, self._seqid) + args = drop_index_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.index_name = index_name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_index_by_name(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_index_by_name_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); + + def get_index_by_name(self, db_name, tbl_name, index_name): + """ + Parameters: + - db_name + - tbl_name + - index_name + """ + self.send_get_index_by_name(db_name, tbl_name, index_name) + return self.recv_get_index_by_name() + + def send_get_index_by_name(self, db_name, tbl_name, index_name): + self._oprot.writeMessageBegin('get_index_by_name', TMessageType.CALL, self._seqid) + args = get_index_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.index_name = index_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_index_by_name(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_index_by_name_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); + + def get_indexes(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + self.send_get_indexes(db_name, tbl_name, max_indexes) + return self.recv_get_indexes() + + def send_get_indexes(self, db_name, tbl_name, max_indexes): + self._oprot.writeMessageBegin('get_indexes', TMessageType.CALL, self._seqid) + args = get_indexes_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_indexes = max_indexes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_indexes(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_indexes_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); + + def get_index_names(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + self.send_get_index_names(db_name, tbl_name, max_indexes) + return self.recv_get_index_names() + + def send_get_index_names(self, db_name, tbl_name, max_indexes): + self._oprot.writeMessageBegin('get_index_names', TMessageType.CALL, self._seqid) + args = get_index_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_indexes = max_indexes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_index_names(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_index_names_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + + +class Processor(fb303.FacebookService.Processor, Iface, TProcessor): + def __init__(self, handler): + fb303.FacebookService.Processor.__init__(self, handler) + self._processMap["create_database"] = Processor.process_create_database + self._processMap["get_database"] = Processor.process_get_database + self._processMap["drop_database"] = Processor.process_drop_database + self._processMap["get_databases"] = Processor.process_get_databases + self._processMap["get_all_databases"] = Processor.process_get_all_databases + self._processMap["get_type"] = Processor.process_get_type + self._processMap["create_type"] = Processor.process_create_type + self._processMap["drop_type"] = Processor.process_drop_type + self._processMap["get_type_all"] = Processor.process_get_type_all + self._processMap["get_fields"] = Processor.process_get_fields + self._processMap["get_schema"] = Processor.process_get_schema + self._processMap["create_table"] = Processor.process_create_table + self._processMap["drop_table"] = Processor.process_drop_table + self._processMap["get_tables"] = Processor.process_get_tables + self._processMap["get_all_tables"] = Processor.process_get_all_tables + self._processMap["get_table"] = Processor.process_get_table + self._processMap["alter_table"] = Processor.process_alter_table + self._processMap["add_partition"] = Processor.process_add_partition + self._processMap["append_partition"] = Processor.process_append_partition + self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name + self._processMap["drop_partition"] = Processor.process_drop_partition + self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name + self._processMap["get_partition"] = Processor.process_get_partition + self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name + self._processMap["get_partitions"] = Processor.process_get_partitions + self._processMap["get_partition_names"] = Processor.process_get_partition_names + self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps + self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps + self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter + self._processMap["alter_partition"] = Processor.process_alter_partition + self._processMap["get_config_value"] = Processor.process_get_config_value + self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals + self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec + self._processMap["add_index"] = Processor.process_add_index + self._processMap["alter_index"] = Processor.process_alter_index + self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name + self._processMap["get_index_by_name"] = Processor.process_get_index_by_name + self._processMap["get_indexes"] = Processor.process_get_indexes + self._processMap["get_index_names"] = Processor.process_get_index_names + + 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_create_database(self, seqid, iprot, oprot): + args = create_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_database_result() + try: + self._handler.create_database(args.database) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_result() + try: + result.success = self._handler.get_database(args.name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_result() + try: + self._handler.drop_database(args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except InvalidOperationException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_databases_result() + try: + result.success = self._handler.get_databases(args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_databases_result() + try: + result.success = self._handler.get_all_databases() + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_result() + try: + result.success = self._handler.get_type(args.name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_type_result() + try: + result.success = self._handler.create_type(args.type) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except NoSuchObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_tables(self, seqid, iprot, oprot): + args = get_all_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_result() + try: + result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_by_name(self, seqid, iprot, oprot): + args = get_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_by_name_result() + try: + result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions(self, seqid, iprot, oprot): + args = get_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_result() + try: + result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names(self, seqid, iprot, oprot): + args = get_partition_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_result() + try: + result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps(self, seqid, iprot, oprot): + args = get_partitions_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_result() + try: + result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps(self, seqid, iprot, oprot): + args = get_partition_names_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_ps_result() + try: + result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_filter(self, seqid, iprot, oprot): + args = get_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_filter_result() + try: + result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition(self, seqid, iprot, oprot): + args = alter_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_result() + try: + self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_config_value(self, seqid, iprot, oprot): + args = get_config_value_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_config_value_result() + try: + result.success = self._handler.get_config_value(args.name, args.defaultValue) + except ConfigValSecurityException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_vals(self, seqid, iprot, oprot): + args = partition_name_to_vals_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_vals_result() + try: + result.success = self._handler.partition_name_to_vals(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_spec(self, seqid, iprot, oprot): + args = partition_name_to_spec_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_spec_result() + try: + result.success = self._handler.partition_name_to_spec(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_index(self, seqid, iprot, oprot): + args = add_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_index_result() + try: + result.success = self._handler.add_index(args.new_index, args.index_table) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_index(self, seqid, iprot, oprot): + args = alter_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_index_result() + try: + self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_index_by_name(self, seqid, iprot, oprot): + args = drop_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_index_by_name_result() + try: + result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_by_name(self, seqid, iprot, oprot): + args = get_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_by_name_result() + try: + result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_indexes(self, seqid, iprot, oprot): + args = get_indexes_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_indexes_result() + try: + result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_names(self, seqid, iprot, oprot): + args = get_index_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_names_result() + try: + result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class create_database_args: + """ + Attributes: + - database + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + ) + + def __init__(self, database=None,): + self.database = database + + 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.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_args') + if self.database != None: + oprot.writeFieldBegin('database', TType.STRUCT, 1) + self.database.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_args: + """ + Attributes: + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleteData', None, None, ), # 2 + ) + + def __init__(self, name=None, deleteData=None,): + self.name = name + self.deleteData = deleteData + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 2) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_args: + """ + Attributes: + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pattern', None, None, ), # 1 + ) + + def __init__(self, pattern=None,): + self.pattern = pattern + + 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.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_args') + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 1) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype106, _size103) = iprot.readListBegin() + for _i107 in xrange(_size103): + _elem108 = iprot.readString(); + self.success.append(_elem108) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter109 in self.success: + oprot.writeString(iter109) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype113, _size110) = iprot.readListBegin() + for _i114 in xrange(_size110): + _elem115 = iprot.readString(); + self.success.append(_elem115) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter116 in self.success: + oprot.writeString(iter116) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Type() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + 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.type = Type() + self.type.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRUCT, 1) + self.type.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'type', None, None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + 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.type = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + 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.MAP: + self.success = {} + (_ktype118, _vtype119, _size117 ) = iprot.readMapBegin() + for _i121 in xrange(_size117): + _key122 = iprot.readString(); + _val123 = Type() + _val123.read(iprot) + self.success[_key122] = _val123 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter124,viter125 in self.success.items(): + oprot.writeString(kiter124) + viter125.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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 = [] + (_etype129, _size126) = iprot.readListBegin() + for _i130 in xrange(_size126): + _elem131 = FieldSchema() + _elem131.read(iprot) + self.success.append(_elem131) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter132 in self.success: + iter132.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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 = [] + (_etype136, _size133) = iprot.readListBegin() + for _i137 in xrange(_size133): + _elem138 = FieldSchema() + _elem138.read(iprot) + self.success.append(_elem138) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter139 in self.success: + iter139.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_args: + """ + Attributes: + - tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + ) + + def __init__(self, tbl=None,): + self.tbl = tbl + + 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.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_args') + if self.tbl != None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 != None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_args: + """ + Attributes: + - dbname + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.BOOL, 'deleteData', None, None, ), # 3 + ) + + def __init__(self, dbname=None, name=None, deleteData=None,): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + + 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.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + 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.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_args: + """ + Attributes: + - db_name + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, db_name=None, pattern=None,): + self.db_name = db_name + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype143, _size140) = iprot.readListBegin() + for _i144 in xrange(_size140): + _elem145 = iprot.readString(); + self.success.append(_elem145) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter146 in self.success: + oprot.writeString(iter146) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_args: + """ + Attributes: + - db_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + ) + + def __init__(self, db_name=None,): + self.db_name = db_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype150, _size147) = iprot.readListBegin() + for _i151 in xrange(_size147): + _elem152 = iprot.readString(); + self.success.append(_elem152) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter153 in self.success: + oprot.writeString(iter153) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_args: + """ + Attributes: + - dbname + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, dbname=None, tbl_name=None,): + self.dbname = dbname + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Table() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + + 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.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.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('alter_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl != None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + 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.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + 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('alter_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_args: + """ + Attributes: + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + ) + + def __init__(self, new_part=None,): + self.new_part = new_part + + 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.new_part = Partition() + self.new_part.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('add_partition_args') + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + 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('add_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype157, _size154) = iprot.readListBegin() + for _i158 in xrange(_size154): + _elem159 = iprot.readString(); + self.part_vals.append(_elem159) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter160 in self.part_vals: + oprot.writeString(iter160) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + 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('append_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + 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('append_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + 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('append_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype164, _size161) = iprot.readListBegin() + for _i165 in xrange(_size161): + _elem166 = iprot.readString(); + self.part_vals.append(_elem166) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter167 in self.part_vals: + oprot.writeString(iter167) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype171, _size168) = iprot.readListBegin() + for _i172 in xrange(_size168): + _elem173 = iprot.readString(); + self.part_vals.append(_elem173) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter174 in self.part_vals: + oprot.writeString(iter174) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = [] + (_etype178, _size175) = iprot.readListBegin() + for _i179 in xrange(_size175): + _elem180 = Partition() + _elem180.read(iprot) + self.success.append(_elem180) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter181 in self.success: + iter181.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + 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 = [] + (_etype185, _size182) = iprot.readListBegin() + for _i186 in xrange(_size182): + _elem187 = iprot.readString(); + self.success.append(_elem187) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter188 in self.success: + oprot.writeString(iter188) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype192, _size189) = iprot.readListBegin() + for _i193 in xrange(_size189): + _elem194 = iprot.readString(); + self.part_vals.append(_elem194) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter195 in self.part_vals: + oprot.writeString(iter195) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype199, _size196) = iprot.readListBegin() + for _i200 in xrange(_size196): + _elem201 = Partition() + _elem201.read(iprot) + self.success.append(_elem201) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter202 in self.success: + iter202.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype206, _size203) = iprot.readListBegin() + for _i207 in xrange(_size203): + _elem208 = iprot.readString(); + self.part_vals.append(_elem208) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_ps_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter209 in self.part_vals: + oprot.writeString(iter209) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_ps_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype213, _size210) = iprot.readListBegin() + for _i214 in xrange(_size210): + _elem215 = iprot.readString(); + self.success.append(_elem215) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_ps_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter216 in self.success: + oprot.writeString(iter216) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_filter_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter != None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = [] + (_etype220, _size217) = iprot.readListBegin() + for _i221 in xrange(_size217): + _elem222 = Partition() + _elem222.read(iprot) + self.success.append(_elem222) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_filter_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter223 in self.success: + iter223.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_args: + """ + Attributes: + - db_name + - tbl_name + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, new_part=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.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('alter_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + 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.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + 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('alter_partition_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_config_value_args: + """ + Attributes: + - name + - defaultValue + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 + ) + + def __init__(self, name=None, defaultValue=None,): + self.name = name + self.defaultValue = defaultValue + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.defaultValue = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_config_value_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.defaultValue != None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_config_value_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = ConfigValSecurityException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_config_value_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_vals_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + def __init__(self, part_name=None,): + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_vals_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_vals_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype227, _size224) = iprot.readListBegin() + for _i228 in xrange(_size224): + _elem229 = iprot.readString(); + self.success.append(_elem229) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_vals_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter230 in self.success: + oprot.writeString(iter230) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_spec_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + def __init__(self, part_name=None,): + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_spec_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_spec_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype232, _vtype233, _size231 ) = iprot.readMapBegin() + for _i235 in xrange(_size231): + _key236 = iprot.readString(); + _val237 = iprot.readString(); + self.success[_key236] = _val237 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_spec_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter238,viter239 in self.success.items(): + oprot.writeString(kiter238) + oprot.writeString(viter239) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_index_args: + """ + Attributes: + - new_index + - index_table + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 + ) + + def __init__(self, new_index=None, index_table=None,): + self.new_index = new_index + self.index_table = index_table + + 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.new_index = Index() + self.new_index.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.index_table = Table() + self.index_table.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('add_index_args') + if self.new_index != None: + oprot.writeFieldBegin('new_index', TType.STRUCT, 1) + self.new_index.write(oprot) + oprot.writeFieldEnd() + if self.index_table != None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_index_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Index() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + 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('add_index_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_index_args: + """ + Attributes: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 + (3, TType.STRING, 'idx_name', None, None, ), # 3 + (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 + ) + + def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): + self.dbname = dbname + self.base_tbl_name = base_tbl_name + self.idx_name = idx_name + self.new_idx = new_idx + + 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.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.base_tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.idx_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.new_idx = Index() + self.new_idx.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('alter_index_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.base_tbl_name != None: + oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) + oprot.writeString(self.base_tbl_name) + oprot.writeFieldEnd() + if self.idx_name != None: + oprot.writeFieldBegin('idx_name', TType.STRING, 3) + oprot.writeString(self.idx_name) + oprot.writeFieldEnd() + if self.new_idx != None: + oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) + self.new_idx.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_index_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + 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.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + 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('alter_index_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_index_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - index_name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_index_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_index_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_index_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - index_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, index_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Index() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_indexes_args: + """ + Attributes: + - db_name + - tbl_name + - max_indexes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_indexes = max_indexes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_indexes_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_indexes_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = [] + (_etype243, _size240) = iprot.readListBegin() + for _i244 in xrange(_size240): + _elem245 = Index() + _elem245.read(iprot) + self.success.append(_elem245) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_indexes_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter246 in self.success: + iter246.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_names_args: + """ + Attributes: + - db_name + - tbl_name + - max_indexes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_indexes = max_indexes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_names_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_names_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + 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 = [] + (_etype250, _size247) = iprot.readListBegin() + for _i251 in xrange(_size247): + _elem252 = iprot.readString(); + self.success.append(_elem252) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_names_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter253 in self.success: + oprot.writeString(iter253) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py new file mode 100644 index 0000000..e9ee039 --- /dev/null +++ metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants', 'ThriftHiveMetastore'] diff --git metastore/src/gen/thrift/gen-py/hive_metastore/constants.py metastore/src/gen/thrift/gen-py/hive_metastore/constants.py new file mode 100644 index 0000000..fdffe2f --- /dev/null +++ metastore/src/gen/thrift/gen-py/hive_metastore/constants.py @@ -0,0 +1,25 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +from ttypes import * + +DDL_TIME = "transient_lastDdlTime" +IS_ARCHIVED = "is_archived" +ORIGINAL_LOCATION = "original_location" +META_TABLE_COLUMNS = "columns" +META_TABLE_COLUMN_TYPES = "columns.types" +BUCKET_FIELD_NAME = "bucket_field_name" +BUCKET_COUNT = "bucket_count" +FIELD_TO_DIMENSION = "field_to_dimension" +META_TABLE_NAME = "name" +META_TABLE_DB = "db" +META_TABLE_LOCATION = "location" +META_TABLE_SERDE = "serde" +META_TABLE_PARTITION_COLUMNS = "partition_columns" +FILE_INPUT_FORMAT = "file.inputformat" +FILE_OUTPUT_FORMAT = "file.outputformat" +META_TABLE_STORAGE = "storage_handler" diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py new file mode 100644 index 0000000..baf51b4 --- /dev/null +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -0,0 +1,1914 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +import fb303.ttypes + + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + + +class Version: + """ + Attributes: + - version + - comments + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version', None, None, ), # 1 + (2, TType.STRING, 'comments', None, None, ), # 2 + ) + + def __init__(self, version=None, comments=None,): + self.version = version + self.comments = comments + + 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.version = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.comments = 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('Version') + if self.version != None: + oprot.writeFieldBegin('version', TType.STRING, 1) + oprot.writeString(self.version) + oprot.writeFieldEnd() + if self.comments != None: + oprot.writeFieldBegin('comments', TType.STRING, 2) + oprot.writeString(self.comments) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class FieldSchema: + """ + Attributes: + - name + - type + - comment + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type', None, None, ), # 2 + (3, TType.STRING, 'comment', None, None, ), # 3 + ) + + def __init__(self, name=None, type=None, comment=None,): + self.name = name + self.type = type + self.comment = comment + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.comment = 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('FieldSchema') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type != None: + oprot.writeFieldBegin('type', TType.STRING, 2) + oprot.writeString(self.type) + oprot.writeFieldEnd() + if self.comment != None: + oprot.writeFieldBegin('comment', TType.STRING, 3) + oprot.writeString(self.comment) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Type: + """ + Attributes: + - name + - type1 + - type2 + - fields + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type1', None, None, ), # 2 + (3, TType.STRING, 'type2', None, None, ), # 3 + (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4 + ) + + def __init__(self, name=None, type1=None, type2=None, fields=None,): + self.name = name + self.type1 = type1 + self.type2 = type2 + self.fields = fields + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type1 = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.type2 = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.fields = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = FieldSchema() + _elem5.read(iprot) + self.fields.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Type') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type1 != None: + oprot.writeFieldBegin('type1', TType.STRING, 2) + oprot.writeString(self.type1) + oprot.writeFieldEnd() + if self.type2 != None: + oprot.writeFieldBegin('type2', TType.STRING, 3) + oprot.writeString(self.type2) + oprot.writeFieldEnd() + if self.fields != None: + oprot.writeFieldBegin('fields', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter6 in self.fields: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Database: + """ + Attributes: + - name + - description + - locationUri + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'description', None, None, ), # 2 + (3, TType.STRING, 'locationUri', None, None, ), # 3 + ) + + def __init__(self, name=None, description=None, locationUri=None,): + self.name = name + self.description = description + self.locationUri = locationUri + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.description = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.locationUri = 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('Database') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.description != None: + oprot.writeFieldBegin('description', TType.STRING, 2) + oprot.writeString(self.description) + oprot.writeFieldEnd() + if self.locationUri != None: + oprot.writeFieldBegin('locationUri', TType.STRING, 3) + oprot.writeString(self.locationUri) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SerDeInfo: + """ + Attributes: + - name + - serializationLib + - parameters + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'serializationLib', None, None, ), # 2 + (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, name=None, serializationLib=None, parameters=None,): + self.name = name + self.serializationLib = serializationLib + self.parameters = parameters + + 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.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.serializationLib = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.parameters = {} + (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() + for _i11 in xrange(_size7): + _key12 = iprot.readString(); + _val13 = iprot.readString(); + self.parameters[_key12] = _val13 + iprot.readMapEnd() + 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('SerDeInfo') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.serializationLib != None: + oprot.writeFieldBegin('serializationLib', TType.STRING, 2) + oprot.writeString(self.serializationLib) + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter14,viter15 in self.parameters.items(): + oprot.writeString(kiter14) + oprot.writeString(viter15) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Order: + """ + Attributes: + - col + - order + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'col', None, None, ), # 1 + (2, TType.I32, 'order', None, None, ), # 2 + ) + + def __init__(self, col=None, order=None,): + self.col = col + self.order = order + + 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.col = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.order = 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('Order') + if self.col != None: + oprot.writeFieldBegin('col', TType.STRING, 1) + oprot.writeString(self.col) + oprot.writeFieldEnd() + if self.order != None: + oprot.writeFieldBegin('order', TType.I32, 2) + oprot.writeI32(self.order) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class StorageDescriptor: + """ + Attributes: + - cols + - location + - inputFormat + - outputFormat + - compressed + - numBuckets + - serdeInfo + - bucketCols + - sortCols + - parameters + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 + (2, TType.STRING, 'location', None, None, ), # 2 + (3, TType.STRING, 'inputFormat', None, None, ), # 3 + (4, TType.STRING, 'outputFormat', None, None, ), # 4 + (5, TType.BOOL, 'compressed', None, None, ), # 5 + (6, TType.I32, 'numBuckets', None, None, ), # 6 + (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7 + (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8 + (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9 + (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10 + ) + + def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None,): + self.cols = cols + self.location = location + self.inputFormat = inputFormat + self.outputFormat = outputFormat + self.compressed = compressed + self.numBuckets = numBuckets + self.serdeInfo = serdeInfo + self.bucketCols = bucketCols + self.sortCols = sortCols + self.parameters = parameters + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.cols = [] + (_etype19, _size16) = iprot.readListBegin() + for _i20 in xrange(_size16): + _elem21 = FieldSchema() + _elem21.read(iprot) + self.cols.append(_elem21) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.location = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.inputFormat = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.outputFormat = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.compressed = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.numBuckets = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.serdeInfo = SerDeInfo() + self.serdeInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.bucketCols = [] + (_etype25, _size22) = iprot.readListBegin() + for _i26 in xrange(_size22): + _elem27 = iprot.readString(); + self.bucketCols.append(_elem27) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.sortCols = [] + (_etype31, _size28) = iprot.readListBegin() + for _i32 in xrange(_size28): + _elem33 = Order() + _elem33.read(iprot) + self.sortCols.append(_elem33) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.MAP: + self.parameters = {} + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString(); + _val40 = iprot.readString(); + self.parameters[_key39] = _val40 + iprot.readMapEnd() + 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('StorageDescriptor') + if self.cols != None: + oprot.writeFieldBegin('cols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.cols)) + for iter41 in self.cols: + iter41.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.location != None: + oprot.writeFieldBegin('location', TType.STRING, 2) + oprot.writeString(self.location) + oprot.writeFieldEnd() + if self.inputFormat != None: + oprot.writeFieldBegin('inputFormat', TType.STRING, 3) + oprot.writeString(self.inputFormat) + oprot.writeFieldEnd() + if self.outputFormat != None: + oprot.writeFieldBegin('outputFormat', TType.STRING, 4) + oprot.writeString(self.outputFormat) + oprot.writeFieldEnd() + if self.compressed != None: + oprot.writeFieldBegin('compressed', TType.BOOL, 5) + oprot.writeBool(self.compressed) + oprot.writeFieldEnd() + if self.numBuckets != None: + oprot.writeFieldBegin('numBuckets', TType.I32, 6) + oprot.writeI32(self.numBuckets) + oprot.writeFieldEnd() + if self.serdeInfo != None: + oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7) + self.serdeInfo.write(oprot) + oprot.writeFieldEnd() + if self.bucketCols != None: + oprot.writeFieldBegin('bucketCols', TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.bucketCols)) + for iter42 in self.bucketCols: + oprot.writeString(iter42) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sortCols != None: + oprot.writeFieldBegin('sortCols', TType.LIST, 9) + oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) + for iter43 in self.sortCols: + iter43.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 10) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter44,viter45 in self.parameters.items(): + oprot.writeString(kiter44) + oprot.writeString(viter45) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Table: + """ + Attributes: + - tableName + - dbName + - owner + - createTime + - lastAccessTime + - retention + - sd + - partitionKeys + - parameters + - viewOriginalText + - viewExpandedText + - tableType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'owner', None, None, ), # 3 + (4, TType.I32, 'createTime', None, None, ), # 4 + (5, TType.I32, 'lastAccessTime', None, None, ), # 5 + (6, TType.I32, 'retention', None, None, ), # 6 + (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7 + (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8 + (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 + (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 + (12, TType.STRING, 'tableType', None, None, ), # 12 + ) + + def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None,): + self.tableName = tableName + self.dbName = dbName + self.owner = owner + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.retention = retention + self.sd = sd + self.partitionKeys = partitionKeys + self.parameters = parameters + self.viewOriginalText = viewOriginalText + self.viewExpandedText = viewExpandedText + self.tableType = tableType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.owner = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.retention = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.partitionKeys = [] + (_etype49, _size46) = iprot.readListBegin() + for _i50 in xrange(_size46): + _elem51 = FieldSchema() + _elem51.read(iprot) + self.partitionKeys.append(_elem51) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.parameters = {} + (_ktype53, _vtype54, _size52 ) = iprot.readMapBegin() + for _i56 in xrange(_size52): + _key57 = iprot.readString(); + _val58 = iprot.readString(); + self.parameters[_key57] = _val58 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.viewOriginalText = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.viewExpandedText = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.tableType = 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('Table') + if self.tableName != None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.owner != None: + oprot.writeFieldBegin('owner', TType.STRING, 3) + oprot.writeString(self.owner) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime != None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.retention != None: + oprot.writeFieldBegin('retention', TType.I32, 6) + oprot.writeI32(self.retention) + oprot.writeFieldEnd() + if self.sd != None: + oprot.writeFieldBegin('sd', TType.STRUCT, 7) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.partitionKeys != None: + oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) + for iter59 in self.partitionKeys: + iter59.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter60,viter61 in self.parameters.items(): + oprot.writeString(kiter60) + oprot.writeString(viter61) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.viewOriginalText != None: + oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10) + oprot.writeString(self.viewOriginalText) + oprot.writeFieldEnd() + if self.viewExpandedText != None: + oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11) + oprot.writeString(self.viewExpandedText) + oprot.writeFieldEnd() + if self.tableType != None: + oprot.writeFieldBegin('tableType', TType.STRING, 12) + oprot.writeString(self.tableType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Partition: + """ + Attributes: + - values + - dbName + - tableName + - createTime + - lastAccessTime + - sd + - parameters + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'tableName', None, None, ), # 3 + (4, TType.I32, 'createTime', None, None, ), # 4 + (5, TType.I32, 'lastAccessTime', None, None, ), # 5 + (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6 + (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7 + ) + + def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None,): + self.values = values + self.dbName = dbName + self.tableName = tableName + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.sd = sd + self.parameters = parameters + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype65, _size62) = iprot.readListBegin() + for _i66 in xrange(_size62): + _elem67 = iprot.readString(); + self.values.append(_elem67) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.parameters = {} + (_ktype69, _vtype70, _size68 ) = iprot.readMapBegin() + for _i72 in xrange(_size68): + _key73 = iprot.readString(); + _val74 = iprot.readString(); + self.parameters[_key73] = _val74 + iprot.readMapEnd() + 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('Partition') + if self.values != None: + oprot.writeFieldBegin('values', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter75 in self.values: + oprot.writeString(iter75) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName != None: + oprot.writeFieldBegin('tableName', TType.STRING, 3) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime != None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.sd != None: + oprot.writeFieldBegin('sd', TType.STRUCT, 6) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter76,viter77 in self.parameters.items(): + oprot.writeString(kiter76) + oprot.writeString(viter77) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Index: + """ + Attributes: + - indexName + - indexHandlerClass + - dbName + - origTableName + - createTime + - lastAccessTime + - indexTableName + - sd + - parameters + - deferredRebuild + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'indexName', None, None, ), # 1 + (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2 + (3, TType.STRING, 'dbName', None, None, ), # 3 + (4, TType.STRING, 'origTableName', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.I32, 'lastAccessTime', None, None, ), # 6 + (7, TType.STRING, 'indexTableName', None, None, ), # 7 + (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8 + (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10 + ) + + def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,): + self.indexName = indexName + self.indexHandlerClass = indexHandlerClass + self.dbName = dbName + self.origTableName = origTableName + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.indexTableName = indexTableName + self.sd = sd + self.parameters = parameters + self.deferredRebuild = deferredRebuild + + 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.indexName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.indexHandlerClass = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.origTableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.indexTableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.parameters = {} + (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin() + for _i82 in xrange(_size78): + _key83 = iprot.readString(); + _val84 = iprot.readString(); + self.parameters[_key83] = _val84 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.BOOL: + self.deferredRebuild = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Index') + if self.indexName != None: + oprot.writeFieldBegin('indexName', TType.STRING, 1) + oprot.writeString(self.indexName) + oprot.writeFieldEnd() + if self.indexHandlerClass != None: + oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2) + oprot.writeString(self.indexHandlerClass) + oprot.writeFieldEnd() + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 3) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.origTableName != None: + oprot.writeFieldBegin('origTableName', TType.STRING, 4) + oprot.writeString(self.origTableName) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime != None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 6) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.indexTableName != None: + oprot.writeFieldBegin('indexTableName', TType.STRING, 7) + oprot.writeString(self.indexTableName) + oprot.writeFieldEnd() + if self.sd != None: + oprot.writeFieldBegin('sd', TType.STRUCT, 8) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter85,viter86 in self.parameters.items(): + oprot.writeString(kiter85) + oprot.writeString(viter86) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.deferredRebuild != None: + oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10) + oprot.writeBool(self.deferredRebuild) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Schema: + """ + Attributes: + - fieldSchemas + - properties + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 + (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2 + ) + + def __init__(self, fieldSchemas=None, properties=None,): + self.fieldSchemas = fieldSchemas + self.properties = properties + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fieldSchemas = [] + (_etype90, _size87) = iprot.readListBegin() + for _i91 in xrange(_size87): + _elem92 = FieldSchema() + _elem92.read(iprot) + self.fieldSchemas.append(_elem92) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.properties = {} + (_ktype94, _vtype95, _size93 ) = iprot.readMapBegin() + for _i97 in xrange(_size93): + _key98 = iprot.readString(); + _val99 = iprot.readString(); + self.properties[_key98] = _val99 + iprot.readMapEnd() + 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('Schema') + if self.fieldSchemas != None: + oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) + for iter100 in self.fieldSchemas: + iter100.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.properties != None: + oprot.writeFieldBegin('properties', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter101,viter102 in self.properties.items(): + oprot.writeString(kiter101) + oprot.writeString(viter102) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class MetaException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('MetaException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownTableException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownTableException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownDBException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownDBException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AlreadyExistsException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AlreadyExistsException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidObjectException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidObjectException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NoSuchObjectException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NoSuchObjectException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class IndexAlreadyExistsException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('IndexAlreadyExistsException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidOperationException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidOperationException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ConfigValSecurityException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ConfigValSecurityException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb new file mode 100644 index 0000000..42c717b --- /dev/null +++ metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb @@ -0,0 +1,40 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'hive_metastore_types' + +DDL_TIME = %q"transient_lastDdlTime" + +IS_ARCHIVED = %q"is_archived" + +ORIGINAL_LOCATION = %q"original_location" + +META_TABLE_COLUMNS = %q"columns" + +META_TABLE_COLUMN_TYPES = %q"columns.types" + +BUCKET_FIELD_NAME = %q"bucket_field_name" + +BUCKET_COUNT = %q"bucket_count" + +FIELD_TO_DIMENSION = %q"field_to_dimension" + +META_TABLE_NAME = %q"name" + +META_TABLE_DB = %q"db" + +META_TABLE_LOCATION = %q"location" + +META_TABLE_SERDE = %q"serde" + +META_TABLE_PARTITION_COLUMNS = %q"partition_columns" + +FILE_INPUT_FORMAT = %q"file.inputformat" + +FILE_OUTPUT_FORMAT = %q"file.outputformat" + +META_TABLE_STORAGE = %q"storage_handler" + diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb new file mode 100644 index 0000000..80349cb --- /dev/null +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -0,0 +1,468 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'fb303_types' + + +class Version + include ::Thrift::Struct, ::Thrift::Struct_Union + VERSION = 1 + COMMENTS = 2 + + FIELDS = { + VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}, + COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class FieldSchema + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE = 2 + COMMENT = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'}, + COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Type + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE1 = 2 + TYPE2 = 3 + FIELDS = 4 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true}, + TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true}, + FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Database + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DESCRIPTION = 2 + LOCATIONURI = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}, + LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SerDeInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + SERIALIZATIONLIB = 2 + PARAMETERS = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Order + include ::Thrift::Struct, ::Thrift::Struct_Union + COL = 1 + ORDER = 2 + + FIELDS = { + COL => {:type => ::Thrift::Types::STRING, :name => 'col'}, + ORDER => {:type => ::Thrift::Types::I32, :name => 'order'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class StorageDescriptor + include ::Thrift::Struct, ::Thrift::Struct_Union + COLS = 1 + LOCATION = 2 + INPUTFORMAT = 3 + OUTPUTFORMAT = 4 + COMPRESSED = 5 + NUMBUCKETS = 6 + SERDEINFO = 7 + BUCKETCOLS = 8 + SORTCOLS = 9 + PARAMETERS = 10 + + FIELDS = { + COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'}, + INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'}, + OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'}, + COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'}, + NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'}, + SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => SerDeInfo}, + BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}}, + SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => Order}}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Table + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + DBNAME = 2 + OWNER = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + RETENTION = 6 + SD = 7 + PARTITIONKEYS = 8 + PARAMETERS = 9 + VIEWORIGINALTEXT = 10 + VIEWEXPANDEDTEXT = 11 + TABLETYPE = 12 + + FIELDS = { + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'}, + VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'}, + TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Partition + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUES = 1 + DBNAME = 2 + TABLENAME = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + SD = 6 + PARAMETERS = 7 + + FIELDS = { + VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Index + include ::Thrift::Struct, ::Thrift::Struct_Union + INDEXNAME = 1 + INDEXHANDLERCLASS = 2 + DBNAME = 3 + ORIGTABLENAME = 4 + CREATETIME = 5 + LASTACCESSTIME = 6 + INDEXTABLENAME = 7 + SD = 8 + PARAMETERS = 9 + DEFERREDREBUILD = 10 + + FIELDS = { + INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'}, + INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Schema + include ::Thrift::Struct, ::Thrift::Struct_Union + FIELDSCHEMAS = 1 + PROPERTIES = 2 + + FIELDS = { + FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class MetaException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class UnknownTableException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class UnknownDBException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class AlreadyExistsException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidObjectException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class NoSuchObjectException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class IndexAlreadyExistsException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidOperationException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ConfigValSecurityException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb new file mode 100644 index 0000000..2a1268e --- /dev/null +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -0,0 +1,2676 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'facebook_service' +require 'hive_metastore_types' + +module ThriftHiveMetastore + class Client < FacebookService::Client + include ::Thrift::Client + + def create_database(database) + send_create_database(database) + recv_create_database() + end + + def send_create_database(database) + send_message('create_database', Create_database_args, :database => database) + end + + def recv_create_database() + result = receive_message(Create_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_database(name) + send_get_database(name) + return recv_get_database() + end + + def send_get_database(name) + send_message('get_database', Get_database_args, :name => name) + end + + def recv_get_database() + result = receive_message(Get_database_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_database failed: unknown result') + end + + def drop_database(name, deleteData) + send_drop_database(name, deleteData) + recv_drop_database() + end + + def send_drop_database(name, deleteData) + send_message('drop_database', Drop_database_args, :name => name, :deleteData => deleteData) + end + + def recv_drop_database() + result = receive_message(Drop_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_databases(pattern) + send_get_databases(pattern) + return recv_get_databases() + end + + def send_get_databases(pattern) + send_message('get_databases', Get_databases_args, :pattern => pattern) + end + + def recv_get_databases() + result = receive_message(Get_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_databases failed: unknown result') + end + + def get_all_databases() + send_get_all_databases() + return recv_get_all_databases() + end + + def send_get_all_databases() + send_message('get_all_databases', Get_all_databases_args) + end + + def recv_get_all_databases() + result = receive_message(Get_all_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_databases failed: unknown result') + end + + def get_type(name) + send_get_type(name) + return recv_get_type() + end + + def send_get_type(name) + send_message('get_type', Get_type_args, :name => name) + end + + def recv_get_type() + result = receive_message(Get_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type failed: unknown result') + end + + def create_type(type) + send_create_type(type) + return recv_create_type() + end + + def send_create_type(type) + send_message('create_type', Create_type_args, :type => type) + end + + def recv_create_type() + result = receive_message(Create_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_type failed: unknown result') + end + + def drop_type(type) + send_drop_type(type) + return recv_drop_type() + end + + def send_drop_type(type) + send_message('drop_type', Drop_type_args, :type => type) + end + + def recv_drop_type() + result = receive_message(Drop_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_type failed: unknown result') + end + + def get_type_all(name) + send_get_type_all(name) + return recv_get_type_all() + end + + def send_get_type_all(name) + send_message('get_type_all', Get_type_all_args, :name => name) + end + + def recv_get_type_all() + result = receive_message(Get_type_all_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type_all failed: unknown result') + end + + def get_fields(db_name, table_name) + send_get_fields(db_name, table_name) + return recv_get_fields() + end + + def send_get_fields(db_name, table_name) + send_message('get_fields', Get_fields_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_fields() + result = receive_message(Get_fields_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields failed: unknown result') + end + + def get_schema(db_name, table_name) + send_get_schema(db_name, table_name) + return recv_get_schema() + end + + def send_get_schema(db_name, table_name) + send_message('get_schema', Get_schema_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_schema() + result = receive_message(Get_schema_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema failed: unknown result') + end + + def create_table(tbl) + send_create_table(tbl) + recv_create_table() + end + + def send_create_table(tbl) + send_message('create_table', Create_table_args, :tbl => tbl) + end + + def recv_create_table() + result = receive_message(Create_table_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def drop_table(dbname, name, deleteData) + send_drop_table(dbname, name, deleteData) + recv_drop_table() + end + + def send_drop_table(dbname, name, deleteData) + send_message('drop_table', Drop_table_args, :dbname => dbname, :name => name, :deleteData => deleteData) + end + + def recv_drop_table() + result = receive_message(Drop_table_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_tables(db_name, pattern) + send_get_tables(db_name, pattern) + return recv_get_tables() + end + + def send_get_tables(db_name, pattern) + send_message('get_tables', Get_tables_args, :db_name => db_name, :pattern => pattern) + end + + def recv_get_tables() + result = receive_message(Get_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables failed: unknown result') + end + + def get_all_tables(db_name) + send_get_all_tables(db_name) + return recv_get_all_tables() + end + + def send_get_all_tables(db_name) + send_message('get_all_tables', Get_all_tables_args, :db_name => db_name) + end + + def recv_get_all_tables() + result = receive_message(Get_all_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') + end + + def get_table(dbname, tbl_name) + send_get_table(dbname, tbl_name) + return recv_get_table() + end + + def send_get_table(dbname, tbl_name) + send_message('get_table', Get_table_args, :dbname => dbname, :tbl_name => tbl_name) + end + + def recv_get_table() + result = receive_message(Get_table_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table failed: unknown result') + end + + def alter_table(dbname, tbl_name, new_tbl) + send_alter_table(dbname, tbl_name, new_tbl) + recv_alter_table() + end + + def send_alter_table(dbname, tbl_name, new_tbl) + send_message('alter_table', Alter_table_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl) + end + + def recv_alter_table() + result = receive_message(Alter_table_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_partition(new_part) + send_add_partition(new_part) + return recv_add_partition() + end + + def send_add_partition(new_part) + send_message('add_partition', Add_partition_args, :new_part => new_part) + end + + def recv_add_partition() + result = receive_message(Add_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition failed: unknown result') + end + + def append_partition(db_name, tbl_name, part_vals) + send_append_partition(db_name, tbl_name, part_vals) + return recv_append_partition() + end + + def send_append_partition(db_name, tbl_name, part_vals) + send_message('append_partition', Append_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_append_partition() + result = receive_message(Append_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition failed: unknown result') + end + + def append_partition_by_name(db_name, tbl_name, part_name) + send_append_partition_by_name(db_name, tbl_name, part_name) + return recv_append_partition_by_name() + end + + def send_append_partition_by_name(db_name, tbl_name, part_name) + send_message('append_partition_by_name', Append_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_append_partition_by_name() + result = receive_message(Append_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name failed: unknown result') + end + + def drop_partition(db_name, tbl_name, part_vals, deleteData) + send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return recv_drop_partition() + end + + def send_drop_partition(db_name, tbl_name, part_vals, deleteData) + send_message('drop_partition', Drop_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData) + end + + def recv_drop_partition() + result = receive_message(Drop_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition failed: unknown result') + end + + def drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return recv_drop_partition_by_name() + end + + def send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_message('drop_partition_by_name', Drop_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData) + end + + def recv_drop_partition_by_name() + result = receive_message(Drop_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name failed: unknown result') + end + + def get_partition(db_name, tbl_name, part_vals) + send_get_partition(db_name, tbl_name, part_vals) + return recv_get_partition() + end + + def send_get_partition(db_name, tbl_name, part_vals) + send_message('get_partition', Get_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_get_partition() + result = receive_message(Get_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result') + end + + def get_partition_by_name(db_name, tbl_name, part_name) + send_get_partition_by_name(db_name, tbl_name, part_name) + return recv_get_partition_by_name() + end + + def send_get_partition_by_name(db_name, tbl_name, part_name) + send_message('get_partition_by_name', Get_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_get_partition_by_name() + result = receive_message(Get_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_by_name failed: unknown result') + end + + def get_partitions(db_name, tbl_name, max_parts) + send_get_partitions(db_name, tbl_name, max_parts) + return recv_get_partitions() + end + + def send_get_partitions(db_name, tbl_name, max_parts) + send_message('get_partitions', Get_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partitions() + result = receive_message(Get_partitions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result') + end + + def get_partition_names(db_name, tbl_name, max_parts) + send_get_partition_names(db_name, tbl_name, max_parts) + return recv_get_partition_names() + end + + def send_get_partition_names(db_name, tbl_name, max_parts) + send_message('get_partition_names', Get_partition_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partition_names() + result = receive_message(Get_partition_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names failed: unknown result') + end + + def get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partitions_ps() + end + + def send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partitions_ps', Get_partitions_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partitions_ps() + result = receive_message(Get_partitions_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps failed: unknown result') + end + + def get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partition_names_ps() + end + + def send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partition_names_ps', Get_partition_names_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partition_names_ps() + result = receive_message(Get_partition_names_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names_ps failed: unknown result') + end + + def get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return recv_get_partitions_by_filter() + end + + def send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_message('get_partitions_by_filter', Get_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) + end + + def recv_get_partitions_by_filter() + result = receive_message(Get_partitions_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_filter failed: unknown result') + end + + def alter_partition(db_name, tbl_name, new_part) + send_alter_partition(db_name, tbl_name, new_part) + recv_alter_partition() + end + + def send_alter_partition(db_name, tbl_name, new_part) + send_message('alter_partition', Alter_partition_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part) + end + + def recv_alter_partition() + result = receive_message(Alter_partition_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_config_value(name, defaultValue) + send_get_config_value(name, defaultValue) + return recv_get_config_value() + end + + def send_get_config_value(name, defaultValue) + send_message('get_config_value', Get_config_value_args, :name => name, :defaultValue => defaultValue) + end + + def recv_get_config_value() + result = receive_message(Get_config_value_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_config_value failed: unknown result') + end + + def partition_name_to_vals(part_name) + send_partition_name_to_vals(part_name) + return recv_partition_name_to_vals() + end + + def send_partition_name_to_vals(part_name) + send_message('partition_name_to_vals', Partition_name_to_vals_args, :part_name => part_name) + end + + def recv_partition_name_to_vals() + result = receive_message(Partition_name_to_vals_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_vals failed: unknown result') + end + + def partition_name_to_spec(part_name) + send_partition_name_to_spec(part_name) + return recv_partition_name_to_spec() + end + + def send_partition_name_to_spec(part_name) + send_message('partition_name_to_spec', Partition_name_to_spec_args, :part_name => part_name) + end + + def recv_partition_name_to_spec() + result = receive_message(Partition_name_to_spec_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_spec failed: unknown result') + end + + def add_index(new_index, index_table) + send_add_index(new_index, index_table) + return recv_add_index() + end + + def send_add_index(new_index, index_table) + send_message('add_index', Add_index_args, :new_index => new_index, :index_table => index_table) + end + + def recv_add_index() + result = receive_message(Add_index_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_index failed: unknown result') + end + + def alter_index(dbname, base_tbl_name, idx_name, new_idx) + send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + recv_alter_index() + end + + def send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + send_message('alter_index', Alter_index_args, :dbname => dbname, :base_tbl_name => base_tbl_name, :idx_name => idx_name, :new_idx => new_idx) + end + + def recv_alter_index() + result = receive_message(Alter_index_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + return recv_drop_index_by_name() + end + + def send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_message('drop_index_by_name', Drop_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name, :deleteData => deleteData) + end + + def recv_drop_index_by_name() + result = receive_message(Drop_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_index_by_name failed: unknown result') + end + + def get_index_by_name(db_name, tbl_name, index_name) + send_get_index_by_name(db_name, tbl_name, index_name) + return recv_get_index_by_name() + end + + def send_get_index_by_name(db_name, tbl_name, index_name) + send_message('get_index_by_name', Get_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name) + end + + def recv_get_index_by_name() + result = receive_message(Get_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_by_name failed: unknown result') + end + + def get_indexes(db_name, tbl_name, max_indexes) + send_get_indexes(db_name, tbl_name, max_indexes) + return recv_get_indexes() + end + + def send_get_indexes(db_name, tbl_name, max_indexes) + send_message('get_indexes', Get_indexes_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_indexes() + result = receive_message(Get_indexes_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_indexes failed: unknown result') + end + + def get_index_names(db_name, tbl_name, max_indexes) + send_get_index_names(db_name, tbl_name, max_indexes) + return recv_get_index_names() + end + + def send_get_index_names(db_name, tbl_name, max_indexes) + send_message('get_index_names', Get_index_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_index_names() + result = receive_message(Get_index_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') + end + + end + + class Processor < FacebookService::Processor + include ::Thrift::Processor + + def process_create_database(seqid, iprot, oprot) + args = read_args(iprot, Create_database_args) + result = Create_database_result.new() + begin + @handler.create_database(args.database) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_database', seqid) + end + + def process_get_database(seqid, iprot, oprot) + args = read_args(iprot, Get_database_args) + result = Get_database_result.new() + begin + result.success = @handler.get_database(args.name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_database', seqid) + end + + def process_drop_database(seqid, iprot, oprot) + args = read_args(iprot, Drop_database_args) + result = Drop_database_result.new() + begin + @handler.drop_database(args.name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue InvalidOperationException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_database', seqid) + end + + def process_get_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_databases_args) + result = Get_databases_result.new() + begin + result.success = @handler.get_databases(args.pattern) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_databases', seqid) + end + + def process_get_all_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_all_databases_args) + result = Get_all_databases_result.new() + begin + result.success = @handler.get_all_databases() + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_databases', seqid) + end + + def process_get_type(seqid, iprot, oprot) + args = read_args(iprot, Get_type_args) + result = Get_type_result.new() + begin + result.success = @handler.get_type(args.name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type', seqid) + end + + def process_create_type(seqid, iprot, oprot) + args = read_args(iprot, Create_type_args) + result = Create_type_result.new() + begin + result.success = @handler.create_type(args.type) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_type', seqid) + end + + def process_drop_type(seqid, iprot, oprot) + args = read_args(iprot, Drop_type_args) + result = Drop_type_result.new() + begin + result.success = @handler.drop_type(args.type) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_type', seqid) + end + + def process_get_type_all(seqid, iprot, oprot) + args = read_args(iprot, Get_type_all_args) + result = Get_type_all_result.new() + begin + result.success = @handler.get_type_all(args.name) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type_all', seqid) + end + + def process_get_fields(seqid, iprot, oprot) + args = read_args(iprot, Get_fields_args) + result = Get_fields_result.new() + begin + result.success = @handler.get_fields(args.db_name, args.table_name) + rescue MetaException => o1 + result.o1 = o1 + rescue UnknownTableException => o2 + result.o2 = o2 + rescue UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_fields', seqid) + end + + def process_get_schema(seqid, iprot, oprot) + args = read_args(iprot, Get_schema_args) + result = Get_schema_result.new() + begin + result.success = @handler.get_schema(args.db_name, args.table_name) + rescue MetaException => o1 + result.o1 = o1 + rescue UnknownTableException => o2 + result.o2 = o2 + rescue UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_schema', seqid) + end + + def process_create_table(seqid, iprot, oprot) + args = read_args(iprot, Create_table_args) + result = Create_table_result.new() + begin + @handler.create_table(args.tbl) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + rescue NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_table', seqid) + end + + def process_drop_table(seqid, iprot, oprot) + args = read_args(iprot, Drop_table_args) + result = Drop_table_result.new() + begin + @handler.drop_table(args.dbname, args.name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_table', seqid) + end + + def process_get_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_args) + result = Get_tables_result.new() + begin + result.success = @handler.get_tables(args.db_name, args.pattern) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables', seqid) + end + + def process_get_all_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_all_tables_args) + result = Get_all_tables_result.new() + begin + result.success = @handler.get_all_tables(args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_tables', seqid) + end + + def process_get_table(seqid, iprot, oprot) + args = read_args(iprot, Get_table_args) + result = Get_table_result.new() + begin + result.success = @handler.get_table(args.dbname, args.tbl_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_table', seqid) + end + + def process_alter_table(seqid, iprot, oprot) + args = read_args(iprot, Alter_table_args) + result = Alter_table_result.new() + begin + @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + rescue InvalidOperationException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_table', seqid) + end + + def process_add_partition(seqid, iprot, oprot) + args = read_args(iprot, Add_partition_args) + result = Add_partition_result.new() + begin + result.success = @handler.add_partition(args.new_part) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partition', seqid) + end + + def process_append_partition(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_args) + result = Append_partition_result.new() + begin + result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition', seqid) + end + + def process_append_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_by_name_args) + result = Append_partition_by_name_result.new() + begin + result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition_by_name', seqid) + end + + def process_drop_partition(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_args) + result = Drop_partition_result.new() + begin + result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition', seqid) + end + + def process_drop_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_by_name_args) + result = Drop_partition_by_name_result.new() + begin + result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition_by_name', seqid) + end + + def process_get_partition(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_args) + result = Get_partition_result.new() + begin + result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition', seqid) + end + + def process_get_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_by_name_args) + result = Get_partition_by_name_result.new() + begin + result.success = @handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_by_name', seqid) + end + + def process_get_partitions(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_args) + result = Get_partitions_result.new() + begin + result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions', seqid) + end + + def process_get_partition_names(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_args) + result = Get_partition_names_result.new() + begin + result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_names', seqid) + end + + def process_get_partitions_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_ps_args) + result = Get_partitions_ps_result.new() + begin + result.success = @handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_partitions_ps', seqid) + end + + def process_get_partition_names_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_ps_args) + result = Get_partition_names_ps_result.new() + begin + result.success = @handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_partition_names_ps', seqid) + end + + def process_get_partitions_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_by_filter_args) + result = Get_partitions_by_filter_result.new() + begin + result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_by_filter', seqid) + end + + def process_alter_partition(seqid, iprot, oprot) + args = read_args(iprot, Alter_partition_args) + result = Alter_partition_result.new() + begin + @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + rescue InvalidOperationException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partition', seqid) + end + + def process_get_config_value(seqid, iprot, oprot) + args = read_args(iprot, Get_config_value_args) + result = Get_config_value_result.new() + begin + result.success = @handler.get_config_value(args.name, args.defaultValue) + rescue ConfigValSecurityException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_config_value', seqid) + end + + def process_partition_name_to_vals(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_vals_args) + result = Partition_name_to_vals_result.new() + begin + result.success = @handler.partition_name_to_vals(args.part_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_vals', seqid) + end + + def process_partition_name_to_spec(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_spec_args) + result = Partition_name_to_spec_result.new() + begin + result.success = @handler.partition_name_to_spec(args.part_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_spec', seqid) + end + + def process_add_index(seqid, iprot, oprot) + args = read_args(iprot, Add_index_args) + result = Add_index_result.new() + begin + result.success = @handler.add_index(args.new_index, args.index_table) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_index', seqid) + end + + def process_alter_index(seqid, iprot, oprot) + args = read_args(iprot, Alter_index_args) + result = Alter_index_result.new() + begin + @handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + rescue InvalidOperationException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_index', seqid) + end + + def process_drop_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_index_by_name_args) + result = Drop_index_by_name_result.new() + begin + result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_index_by_name', seqid) + end + + def process_get_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_index_by_name_args) + result = Get_index_by_name_result.new() + begin + result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_by_name', seqid) + end + + def process_get_indexes(seqid, iprot, oprot) + args = read_args(iprot, Get_indexes_args) + result = Get_indexes_result.new() + begin + result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_indexes', seqid) + end + + def process_get_index_names(seqid, iprot, oprot) + args = read_args(iprot, Get_index_names_args) + result = Get_index_names_result.new() + begin + result.success = @handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_names', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class Create_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DATABASE = 1 + + FIELDS = { + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Database}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DELETEDATA = 2 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PATTERN = 1 + + FIELDS = { + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Type}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => Type} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Type}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TBL = 1 + + FIELDS = { + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + NAME = 2 + DELETEDATA = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + PATTERN = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Table}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + NEW_TBL = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PART = 1 + + FIELDS = { + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PART = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DEFAULTVALUE = 2 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DEFAULTVALUE => {:type => ::Thrift::Types::STRING, :name => 'defaultValue'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ConfigValSecurityException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_INDEX = 1 + INDEX_TABLE = 2 + + FIELDS = { + NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => Index}, + INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_index_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + BASE_TBL_NAME = 2 + IDX_NAME = 3 + NEW_IDX = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + BASE_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'base_tbl_name'}, + IDX_NAME => {:type => ::Thrift::Types::STRING, :name => 'idx_name'}, + NEW_IDX => {:type => ::Thrift::Types::STRUCT, :name => 'new_idx', :class => Index} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_index_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Index}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end + diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index 96ef5b7..a636dbb 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 3c9369b..97637d2 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -448,7 +448,12 @@ public class ObjectStore implements RawStore, Configurable { .getComment())); } } - return new Type(mtype.getName(), mtype.getType1(), mtype.getType2(), fields); + Type ret = new Type(); + ret.setName(mtype.getName()); + ret.setType1(mtype.getType1()); + ret.setType2(mtype.getType2()); + ret.setFields(fields); + return ret; } public boolean createType(Type type) { diff --git odbc/Makefile odbc/Makefile index 816ffd4..2c55903 100644 --- odbc/Makefile +++ odbc/Makefile @@ -56,12 +56,13 @@ LINK = ln -sf BUILD_DIR = $(HIVE_ROOT)/build ODBC_BUILD_DIR = $(BUILD_DIR)/odbc OBJ_SERVICE_BUILD_DIR = $(BUILD_DIR)/service/objs -OBJ_FB303_BUILD_DIR = $(BUILD_DIR)/service/fb303/objs +OBJ_QL_BUILD_DIR = $(BUILD_DIR)/ql/objs OBJ_METASTORE_BUILD_DIR = $(BUILD_DIR)/metastore/objs OBJ_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/objs LIB_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/lib TEST_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/test -THRIFT_INCLUDE_PATH = $(HIVE_ROOT)/service/include/thrift +THRIFT_INCLUDE_PATH=$(THRIFT_HOME)/include/thrift +FB303_INCLUDE_PATH=$(THRIFT_INCLUDE_PATH)/fb303 INSTALL_PATH = /usr/local INSTALL_LIB_PATH = $(INSTALL_PATH)/lib INSTALL_INCLUDE_PATH = $(INSTALL_PATH)/include @@ -79,30 +80,31 @@ AR_NAME = lib$(LIB_NAME).a AR_TARGET = $(LIB_ODBC_BUILD_DIR)/$(AR_NAME) AR_INSTALL_TARGET = $(INSTALL_LIB_PATH)/$(AR_NAME) -SERVICE_SRC_DIR = $(HIVE_ROOT)/service/src/gen-cpp +SERVICE_SRC_DIR = $(HIVE_ROOT)/service/src/gen/thrift/gen-cpp SERVICE_SOURCES = ThriftHive.cpp \ hive_service_constants.cpp \ hive_service_types.cpp SERVICE_OBJS = $(addprefix $(OBJ_SERVICE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(SERVICE_SOURCES)))) -FB303_SRC_DIR = $(THRIFT_INCLUDE_PATH)/fb303 -FB303_SOURCES = FacebookService.cpp \ - fb303_constants.cpp \ - fb303_types.cpp -FB303_OBJS = $(addprefix $(OBJ_FB303_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(FB303_SOURCES)))) +QL_SRC_DIR = $(HIVE_ROOT)/ql/src/gen/thrift/gen-cpp +QL_SOURCES = queryplan_types.cpp queryplan_constants.cpp +QL_OBJS = $(addprefix $(OBJ_QL_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(QL_SOURCES)))) -METASTORE_SRC_DIR = $(HIVE_ROOT)/metastore/src/gen-cpp + +METASTORE_SRC_DIR = $(HIVE_ROOT)/metastore/src/gen/thrift/gen-cpp METASTORE_SOURCES = ThriftHiveMetastore.cpp \ hive_metastore_constants.cpp \ hive_metastore_types.cpp METASTORE_OBJS = $(addprefix $(OBJ_METASTORE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(METASTORE_SOURCES)))) ODBC_SRC_DIR = $(BASE_DIR)/src/cpp + ODBC_SOURCES = hiveclient.cpp \ HiveResultSet.cpp \ HiveColumnDesc.cpp \ HiveRowSet.cpp \ hiveclienthelper.cpp + ODBC_OBJS = $(addprefix $(OBJ_ODBC_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(ODBC_SOURCES)))) ODBC_TEST_SRC_DIR = $(BASE_DIR)/src/test @@ -111,9 +113,10 @@ TEST_FLAGS = -DTEST_DATA_DIR=$(ODBC_TEST_DATA_DIR) HIVE_CLIENT_TEST = $(TEST_ODBC_BUILD_DIR)/HiveClientTestC INCLUDE_PATHS = -I$(THRIFT_INCLUDE_PATH) \ + -I$(FB303_INCLUDE_PATH) \ -I$(BOOST_INCLUDE_PATH) \ - -I$(FB303_SRC_DIR) \ -I$(SERVICE_SRC_DIR) \ + -I$(QL_SRC_DIR) \ -I$(METASTORE_SRC_DIR) \ -I$(ODBC_SRC_DIR) @@ -127,20 +130,25 @@ LIB_THRIFT_DIR = $(THRIFT_HOME)/lib LIB_THRIFT_ADD = -L$(LIB_THRIFT_DIR) -lthrift LIB_THRIFT_AR = $(LIB_THRIFT_DIR)/libthrift.a +LIB_FB303_DIR = $(THRIFT_HOME)/lib +LIB_FB303_ADD = -L$(LIB_FB303_DIR) -lfb303 +LIB_FB303_AR = $(LIB_FB303_DIR)/libfb303.a + all:: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST) -$(AR_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS) +$(AR_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS) if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi mkdir -p $(LIB_ODBC_BUILD_DIR) $(AR) $(ARXFLAGS) $(LIB_THRIFT_AR) #Extract thrift archive + $(AR) $(ARXFLAGS) $(LIB_FB303_AR) #Extract fb303 archive $(AR) $(ARFLAGS) $@ $+ *.o #Include all object files into new archive rm *.o #Remove extracted archive object files -$(SO_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS) +$(SO_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS) if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi mkdir -p $(LIB_ODBC_BUILD_DIR) - $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) -o $@ \ + $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) $(LIB_FB303_ADD) -o $@ \ && $(LINK) $(SO_NAME) $(SO_LINK_TARGET) @@ -148,8 +156,8 @@ $(OBJ_SERVICE_BUILD_DIR)/%.o: $(SERVICE_SRC_DIR)/%.cpp mkdir -p $(OBJ_SERVICE_BUILD_DIR) $(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@ -$(OBJ_FB303_BUILD_DIR)/%.o: $(FB303_SRC_DIR)/%.cpp - mkdir -p $(OBJ_FB303_BUILD_DIR) +$(OBJ_QL_BUILD_DIR)/%.o: $(QL_SRC_DIR)/%.cpp + mkdir -p $(OBJ_QL_BUILD_DIR) $(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@ $(OBJ_METASTORE_BUILD_DIR)/%.o: $(METASTORE_SRC_DIR)/%.cpp @@ -162,7 +170,7 @@ $(OBJ_ODBC_BUILD_DIR)/%.o: $(ODBC_SRC_DIR)/%.cpp $(HIVE_CLIENT_TEST): $(SO_TARGET) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c mkdir -p $(TEST_ODBC_BUILD_DIR) - $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift -o $@ + $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift $(LIB_FB303_ADD) -o $@ install: $(AR_TARGET) $(SO_TARGET) @@ -179,7 +187,7 @@ uninstall: rm -f $(HEADER_TARGETS) clean: - rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_FB303_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR) + rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_QL_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR) test: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST) - LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST) + LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LIB_FB303_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST) diff --git odbc/build.xml odbc/build.xml index 64cf988..db9f4af 100644 --- odbc/build.xml +++ odbc/build.xml @@ -46,18 +46,6 @@ - - - - - - - - - - - - diff --git odbc/src/cpp/HiveRowSet.cpp odbc/src/cpp/HiveRowSet.cpp index b4dc2c0..3de6124 100644 --- odbc/src/cpp/HiveRowSet.cpp +++ odbc/src/cpp/HiveRowSet.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "HiveRowSet.h" #include "hiveclienthelper.h" diff --git odbc/src/cpp/hiveclienthelper.cpp odbc/src/cpp/hiveclienthelper.cpp index e2d48f3..b0f3aae 100644 --- odbc/src/cpp/hiveclienthelper.cpp +++ odbc/src/cpp/hiveclienthelper.cpp @@ -18,6 +18,7 @@ #include #include +#include #include "hiveclienthelper.h" #include "thriftserverconstants.h" diff --git ql/build.xml ql/build.xml index a025a2b..3eea73c 100644 --- ql/build.xml +++ ql/build.xml @@ -28,7 +28,6 @@ - @@ -55,10 +54,11 @@ - - Executing thrift (which needs to be in your path) on if/queryplan.thrift - - + + You must set the 'thrift.home' property! + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/queryplan.thrift + + @@ -132,27 +132,27 @@ - + Building Grammar ${src.dir}/org/apache/hadoop/hive/ql/parse/Hive.g .... - + - + - + diff --git ql/if/queryplan.thrift ql/if/queryplan.thrift index aca0e8f..0f59249 100644 --- ql/if/queryplan.thrift +++ ql/if/queryplan.thrift @@ -1,5 +1,5 @@ namespace java org.apache.hadoop.hive.ql.plan.api -namespace cpp Hive +namespace cpp Apache.Hadoop.Hive enum AdjacencyType { CONJUNCTIVE, DISJUNCTIVE } struct Adjacency { @@ -16,7 +16,27 @@ struct Graph { } #Represents a operator along with its counters -enum OperatorType { JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD } +enum OperatorType { + JOIN, + MAPJOIN, + EXTRACT, + FILTER, + FORWARD, + GROUPBY, + LIMIT, + SCRIPT, + SELECT, + TABLESCAN, + FILESINK, + REDUCESINK, + UNION, + UDTF, + LATERALVIEWJOIN, + LATERALVIEWFORWARD, + HASHTABLESINK, + HASHTABLEDUMMY, +} + struct Operator { 1: string operatorId, 2: OperatorType operatorType, @@ -41,7 +61,18 @@ struct Task { } # Represents a Stage - unfortunately, it is represented as Task in ql/exec -enum StageType { CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE } +enum StageType { + CONDITIONAL, + COPY, + DDL, + MAPRED, + EXPLAIN, + FETCH, + FUNC, + MAPREDLOCAL, + MOVE, + STATS +} struct Stage { 1: string stageId, diff --git ql/ivy.xml ql/ivy.xml index e72a450..26041b5 100644 --- ql/ivy.xml +++ ql/ivy.xml @@ -3,6 +3,8 @@ - + + + diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java deleted file mode 100644 index 742f742..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean adjacencyType = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NODE, new FieldMetaData("node", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(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 { - FieldMetaData.addStructMetaDataMap(Adjacency.class, metaDataMap); - } - - public Adjacency() { - } - - public Adjacency( - String node, - List children, - int adjacencyType) - { - this(); - this.node = node; - this.children = children; - this.adjacencyType = adjacencyType; - this.__isset.adjacencyType = true; - } - - /** - * Performs a deep copy on other. - */ - public Adjacency(Adjacency other) { - if (other.isSetNode()) { - this.node = other.node; - } - if (other.isSetChildren()) { - List __this__children = new ArrayList(); - for (String other_element : other.children) { - __this__children.add(other_element); - } - this.children = __this__children; - } - __isset.adjacencyType = other.__isset.adjacencyType; - this.adjacencyType = other.adjacencyType; - } - - @Override - public Adjacency clone() { - return new Adjacency(this); - } - - public String getNode() { - return this.node; - } - - public void setNode(String node) { - this.node = node; - } - - public void unsetNode() { - this.node = null; - } - - // Returns true if field node is set (has been asigned a value) and false otherwise - public boolean isSetNode() { - return this.node != null; - } - - public int getChildrenSize() { - return (this.children == null) ? 0 : this.children.size(); - } - - public java.util.Iterator getChildrenIterator() { - return (this.children == null) ? null : this.children.iterator(); - } - - public void addToChildren(String elem) { - if (this.children == null) { - this.children = new ArrayList(); - } - this.children.add(elem); - } - - public List getChildren() { - return this.children; - } - - public void setChildren(List children) { - this.children = children; - } - - public void unsetChildren() { - this.children = null; - } - - // 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() { - return this.adjacencyType; - } - - public void setAdjacencyType(int adjacencyType) { - this.adjacencyType = adjacencyType; - this.__isset.adjacencyType = true; - } - - public void unsetAdjacencyType() { - this.__isset.adjacencyType = false; - } - - // Returns true if field adjacencyType is set (has been asigned a value) and false otherwise - public boolean isSetAdjacencyType() { - return this.__isset.adjacencyType; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NODE: - if (value == null) { - unsetNode(); - } else { - setNode((String)value); - } - break; - - case CHILDREN: - if (value == null) { - unsetChildren(); - } else { - setChildren((List)value); - } - break; - - case ADJACENCYTYPE: - if (value == null) { - unsetAdjacencyType(); - } else { - setAdjacencyType((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NODE: - return getNode(); - - case CHILDREN: - return getChildren(); - - case ADJACENCYTYPE: - return getAdjacencyType(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NODE: - return isSetNode(); - case CHILDREN: - return isSetChildren(); - case ADJACENCYTYPE: - return isSetAdjacencyType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Adjacency) - return this.equals((Adjacency)that); - return false; - } - - public boolean equals(Adjacency that) { - if (that == null) - return false; - - boolean this_present_node = true && this.isSetNode(); - boolean that_present_node = true && that.isSetNode(); - if (this_present_node || that_present_node) { - if (!(this_present_node && that_present_node)) - return false; - if (!this.node.equals(that.node)) - return false; - } - - boolean this_present_children = true && this.isSetChildren(); - boolean that_present_children = true && that.isSetChildren(); - if (this_present_children || that_present_children) { - if (!(this_present_children && that_present_children)) - return false; - if (!this.children.equals(that.children)) - return false; - } - - boolean this_present_adjacencyType = true; - boolean that_present_adjacencyType = true; - if (this_present_adjacencyType || that_present_adjacencyType) { - if (!(this_present_adjacencyType && that_present_adjacencyType)) - return false; - if (this.adjacencyType != that.adjacencyType) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NODE: - if (field.type == TType.STRING) { - this.node = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case CHILDREN: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.children = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; - _elem2 = iprot.readString(); - this.children.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ADJACENCYTYPE: - if (field.type == TType.I32) { - this.adjacencyType = iprot.readI32(); - this.__isset.adjacencyType = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.node != null) { - oprot.writeFieldBegin(NODE_FIELD_DESC); - oprot.writeString(this.node); - oprot.writeFieldEnd(); - } - if (this.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.children.size())); - for (String _iter3 : this.children) { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); - oprot.writeI32(this.adjacencyType); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Adjacency("); - boolean first = true; - - sb.append("node:"); - if (this.node == null) { - sb.append("null"); - } else { - sb.append(this.node); - } - first = false; - if (!first) sb.append(", "); - sb.append("children:"); - if (this.children == null) { - sb.append("null"); - } else { - sb.append(this.children); - } - 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(")"); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index 24e04e4..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -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; - -public class AdjacencyType { - public static final int CONJUNCTIVE = 0; - public static final int DISJUNCTIVE = 1; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - CONJUNCTIVE, - DISJUNCTIVE ); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(CONJUNCTIVE, "CONJUNCTIVE"); - put(DISJUNCTIVE, "DISJUNCTIVE"); - }}; -} 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 deleted file mode 100644 index 79719ef..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java +++ /dev/null @@ -1,430 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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 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; - } - - 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, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(ADJACENCYLIST, new FieldMetaData("adjacencyList", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Adjacency.class)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap); - } - - public Graph() { - } - - public Graph( - int nodeType, - List roots, - List adjacencyList) - { - this(); - this.nodeType = nodeType; - this.__isset.nodeType = true; - this.roots = roots; - this.adjacencyList = adjacencyList; - } - - /** - * Performs a deep copy on other. - */ - public Graph(Graph other) { - __isset.nodeType = other.__isset.nodeType; - this.nodeType = other.nodeType; - if (other.isSetRoots()) { - List __this__roots = new ArrayList(); - for (String other_element : other.roots) { - __this__roots.add(other_element); - } - this.roots = __this__roots; - } - if (other.isSetAdjacencyList()) { - List __this__adjacencyList = new ArrayList(); - for (Adjacency other_element : other.adjacencyList) { - __this__adjacencyList.add(new Adjacency(other_element)); - } - this.adjacencyList = __this__adjacencyList; - } - } - - @Override - public Graph clone() { - return new Graph(this); - } - - public int getNodeType() { - return this.nodeType; - } - - public void setNodeType(int nodeType) { - this.nodeType = nodeType; - this.__isset.nodeType = true; - } - - public void unsetNodeType() { - this.__isset.nodeType = false; - } - - // Returns true if field nodeType is set (has been asigned a value) and false otherwise - public boolean isSetNodeType() { - return this.__isset.nodeType; - } - - public int getRootsSize() { - return (this.roots == null) ? 0 : this.roots.size(); - } - - public java.util.Iterator getRootsIterator() { - return (this.roots == null) ? null : this.roots.iterator(); - } - - public void addToRoots(String elem) { - if (this.roots == null) { - this.roots = new ArrayList(); - } - this.roots.add(elem); - } - - public List getRoots() { - return this.roots; - } - - public void setRoots(List roots) { - this.roots = roots; - } - - public void unsetRoots() { - this.roots = null; - } - - // Returns true if field roots is set (has been asigned a value) and false otherwise - public boolean isSetRoots() { - return this.roots != null; - } - - public int getAdjacencyListSize() { - return (this.adjacencyList == null) ? 0 : this.adjacencyList.size(); - } - - public java.util.Iterator getAdjacencyListIterator() { - return (this.adjacencyList == null) ? null : this.adjacencyList.iterator(); - } - - public void addToAdjacencyList(Adjacency elem) { - if (this.adjacencyList == null) { - this.adjacencyList = new ArrayList(); - } - this.adjacencyList.add(elem); - } - - public List getAdjacencyList() { - return this.adjacencyList; - } - - public void setAdjacencyList(List adjacencyList) { - this.adjacencyList = adjacencyList; - } - - public void unsetAdjacencyList() { - this.adjacencyList = null; - } - - // 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: - if (value == null) { - unsetNodeType(); - } else { - setNodeType((Integer)value); - } - break; - - case ROOTS: - if (value == null) { - unsetRoots(); - } else { - setRoots((List)value); - } - break; - - case ADJACENCYLIST: - if (value == null) { - unsetAdjacencyList(); - } else { - setAdjacencyList((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NODETYPE: - return getNodeType(); - - case ROOTS: - return getRoots(); - - case ADJACENCYLIST: - return getAdjacencyList(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NODETYPE: - return isSetNodeType(); - case ROOTS: - return isSetRoots(); - case ADJACENCYLIST: - return isSetAdjacencyList(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Graph) - return this.equals((Graph)that); - return false; - } - - public boolean equals(Graph that) { - if (that == null) - return false; - - boolean this_present_nodeType = true; - boolean that_present_nodeType = true; - if (this_present_nodeType || that_present_nodeType) { - if (!(this_present_nodeType && that_present_nodeType)) - return false; - if (this.nodeType != that.nodeType) - return false; - } - - boolean this_present_roots = true && this.isSetRoots(); - boolean that_present_roots = true && that.isSetRoots(); - if (this_present_roots || that_present_roots) { - if (!(this_present_roots && that_present_roots)) - return false; - if (!this.roots.equals(that.roots)) - return false; - } - - boolean this_present_adjacencyList = true && this.isSetAdjacencyList(); - boolean that_present_adjacencyList = true && that.isSetAdjacencyList(); - if (this_present_adjacencyList || that_present_adjacencyList) { - if (!(this_present_adjacencyList && that_present_adjacencyList)) - return false; - if (!this.adjacencyList.equals(that.adjacencyList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NODETYPE: - if (field.type == TType.I32) { - this.nodeType = iprot.readI32(); - this.__isset.nodeType = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROOTS: - if (field.type == TType.LIST) { - { - TList _list4 = iprot.readListBegin(); - this.roots = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; - _elem6 = iprot.readString(); - this.roots.add(_elem6); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ADJACENCYLIST: - if (field.type == TType.LIST) { - { - TList _list7 = iprot.readListBegin(); - this.adjacencyList = new ArrayList(_list7.size); - for (int _i8 = 0; _i8 < _list7.size; ++_i8) - { - Adjacency _elem9; - _elem9 = new Adjacency(); - _elem9.read(iprot); - this.adjacencyList.add(_elem9); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); - oprot.writeI32(this.nodeType); - 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) { - oprot.writeString(_iter10); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.adjacencyList != null) { - oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.adjacencyList.size())); - for (Adjacency _iter11 : this.adjacencyList) { - _iter11.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Graph("); - 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(")"); - } - first = false; - if (!first) sb.append(", "); - sb.append("roots:"); - if (this.roots == null) { - sb.append("null"); - } else { - sb.append(this.roots); - } - first = false; - if (!first) sb.append(", "); - sb.append("adjacencyList:"); - if (this.adjacencyList == null) { - sb.append("null"); - } else { - sb.append(this.adjacencyList); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index 9a2747e..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -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; - -public class NodeType { - public static final int OPERATOR = 0; - public static final int STAGE = 1; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - OPERATOR, - STAGE ); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(OPERATOR, "OPERATOR"); - put(STAGE, "STAGE"); - }}; -} 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 deleted file mode 100644 index ff6d61f..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java +++ /dev/null @@ -1,646 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField OPERATOR_COUNTERS_FIELD_DESC = new TField("operatorCounters", TType.MAP, (short)4); - private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)5); - 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 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(OPERATORID, 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, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(OPERATORCOUNTERS, new FieldMetaData("operatorCounters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.I64)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Operator.class, metaDataMap); - } - - public Operator() { - } - - public Operator( - String operatorId, - int operatorType, - Map operatorAttributes, - Map operatorCounters, - boolean done, - boolean started) - { - this(); - this.operatorId = operatorId; - this.operatorType = operatorType; - this.__isset.operatorType = true; - this.operatorAttributes = operatorAttributes; - this.operatorCounters = operatorCounters; - this.done = done; - this.__isset.done = true; - this.started = started; - this.__isset.started = true; - } - - /** - * Performs a deep copy on other. - */ - public Operator(Operator other) { - if (other.isSetOperatorId()) { - this.operatorId = other.operatorId; - } - __isset.operatorType = other.__isset.operatorType; - this.operatorType = other.operatorType; - if (other.isSetOperatorAttributes()) { - Map __this__operatorAttributes = new HashMap(); - for (Map.Entry other_element : other.operatorAttributes.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__operatorAttributes_copy_key = other_element_key; - - String __this__operatorAttributes_copy_value = other_element_value; - - __this__operatorAttributes.put(__this__operatorAttributes_copy_key, __this__operatorAttributes_copy_value); - } - this.operatorAttributes = __this__operatorAttributes; - } - if (other.isSetOperatorCounters()) { - Map __this__operatorCounters = new HashMap(); - for (Map.Entry other_element : other.operatorCounters.entrySet()) { - - String other_element_key = other_element.getKey(); - Long other_element_value = other_element.getValue(); - - String __this__operatorCounters_copy_key = other_element_key; - - Long __this__operatorCounters_copy_value = other_element_value; - - __this__operatorCounters.put(__this__operatorCounters_copy_key, __this__operatorCounters_copy_value); - } - this.operatorCounters = __this__operatorCounters; - } - __isset.done = other.__isset.done; - this.done = other.done; - __isset.started = other.__isset.started; - this.started = other.started; - } - - @Override - public Operator clone() { - return new Operator(this); - } - - public String getOperatorId() { - return this.operatorId; - } - - public void setOperatorId(String operatorId) { - this.operatorId = operatorId; - } - - public void unsetOperatorId() { - this.operatorId = null; - } - - // 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() { - return this.operatorType; - } - - public void setOperatorType(int operatorType) { - this.operatorType = operatorType; - this.__isset.operatorType = true; - } - - public void unsetOperatorType() { - this.__isset.operatorType = false; - } - - // Returns true if field operatorType is set (has been asigned a value) and false otherwise - public boolean isSetOperatorType() { - return this.__isset.operatorType; - } - - public int getOperatorAttributesSize() { - return (this.operatorAttributes == null) ? 0 : this.operatorAttributes.size(); - } - - public void putToOperatorAttributes(String key, String val) { - if (this.operatorAttributes == null) { - this.operatorAttributes = new HashMap(); - } - this.operatorAttributes.put(key, val); - } - - public Map getOperatorAttributes() { - return this.operatorAttributes; - } - - public void setOperatorAttributes(Map operatorAttributes) { - this.operatorAttributes = operatorAttributes; - } - - public void unsetOperatorAttributes() { - this.operatorAttributes = null; - } - - // Returns true if field operatorAttributes is set (has been asigned a value) and false otherwise - public boolean isSetOperatorAttributes() { - return this.operatorAttributes != null; - } - - public int getOperatorCountersSize() { - return (this.operatorCounters == null) ? 0 : this.operatorCounters.size(); - } - - public void putToOperatorCounters(String key, long val) { - if (this.operatorCounters == null) { - this.operatorCounters = new HashMap(); - } - this.operatorCounters.put(key, val); - } - - public Map getOperatorCounters() { - return this.operatorCounters; - } - - public void setOperatorCounters(Map operatorCounters) { - this.operatorCounters = operatorCounters; - } - - public void unsetOperatorCounters() { - this.operatorCounters = null; - } - - // Returns true if field operatorCounters is set (has been asigned a value) and false otherwise - public boolean isSetOperatorCounters() { - return this.operatorCounters != null; - } - - public boolean isDone() { - return this.done; - } - - public void setDone(boolean done) { - this.done = done; - this.__isset.done = true; - } - - public void unsetDone() { - this.__isset.done = false; - } - - // Returns true if field done is set (has been asigned a value) and false otherwise - public boolean isSetDone() { - return this.__isset.done; - } - - public boolean isStarted() { - return this.started; - } - - public void setStarted(boolean started) { - this.started = started; - this.__isset.started = true; - } - - public void unsetStarted() { - this.__isset.started = false; - } - - // Returns true if field started is set (has been asigned a value) and false otherwise - public boolean isSetStarted() { - return this.__isset.started; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case OPERATORID: - if (value == null) { - unsetOperatorId(); - } else { - setOperatorId((String)value); - } - break; - - case OPERATORTYPE: - if (value == null) { - unsetOperatorType(); - } else { - setOperatorType((Integer)value); - } - break; - - case OPERATORATTRIBUTES: - if (value == null) { - unsetOperatorAttributes(); - } else { - setOperatorAttributes((Map)value); - } - break; - - case OPERATORCOUNTERS: - if (value == null) { - unsetOperatorCounters(); - } else { - setOperatorCounters((Map)value); - } - break; - - case DONE: - if (value == null) { - unsetDone(); - } else { - setDone((Boolean)value); - } - break; - - case STARTED: - if (value == null) { - unsetStarted(); - } else { - setStarted((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case OPERATORID: - return getOperatorId(); - - case OPERATORTYPE: - return getOperatorType(); - - case OPERATORATTRIBUTES: - return getOperatorAttributes(); - - case OPERATORCOUNTERS: - return getOperatorCounters(); - - case DONE: - return new Boolean(isDone()); - - case STARTED: - return new Boolean(isStarted()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case OPERATORID: - return isSetOperatorId(); - case OPERATORTYPE: - return isSetOperatorType(); - case OPERATORATTRIBUTES: - return isSetOperatorAttributes(); - case OPERATORCOUNTERS: - return isSetOperatorCounters(); - case DONE: - return isSetDone(); - case STARTED: - return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Operator) - return this.equals((Operator)that); - return false; - } - - public boolean equals(Operator that) { - if (that == null) - return false; - - boolean this_present_operatorId = true && this.isSetOperatorId(); - boolean that_present_operatorId = true && that.isSetOperatorId(); - if (this_present_operatorId || that_present_operatorId) { - if (!(this_present_operatorId && that_present_operatorId)) - return false; - if (!this.operatorId.equals(that.operatorId)) - return false; - } - - boolean this_present_operatorType = true; - boolean that_present_operatorType = true; - if (this_present_operatorType || that_present_operatorType) { - if (!(this_present_operatorType && that_present_operatorType)) - return false; - if (this.operatorType != that.operatorType) - return false; - } - - boolean this_present_operatorAttributes = true && this.isSetOperatorAttributes(); - boolean that_present_operatorAttributes = true && that.isSetOperatorAttributes(); - if (this_present_operatorAttributes || that_present_operatorAttributes) { - if (!(this_present_operatorAttributes && that_present_operatorAttributes)) - return false; - if (!this.operatorAttributes.equals(that.operatorAttributes)) - return false; - } - - boolean this_present_operatorCounters = true && this.isSetOperatorCounters(); - boolean that_present_operatorCounters = true && that.isSetOperatorCounters(); - if (this_present_operatorCounters || that_present_operatorCounters) { - if (!(this_present_operatorCounters && that_present_operatorCounters)) - return false; - if (!this.operatorCounters.equals(that.operatorCounters)) - return false; - } - - boolean this_present_done = true; - boolean that_present_done = true; - if (this_present_done || that_present_done) { - if (!(this_present_done && that_present_done)) - return false; - if (this.done != that.done) - return false; - } - - boolean this_present_started = true; - boolean that_present_started = true; - if (this_present_started || that_present_started) { - if (!(this_present_started && that_present_started)) - return false; - if (this.started != that.started) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case OPERATORID: - if (field.type == TType.STRING) { - this.operatorId = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OPERATORTYPE: - if (field.type == TType.I32) { - this.operatorType = iprot.readI32(); - this.__isset.operatorType = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OPERATORATTRIBUTES: - if (field.type == TType.MAP) { - { - TMap _map12 = iprot.readMapBegin(); - this.operatorAttributes = new HashMap(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) - { - String _key14; - String _val15; - _key14 = iprot.readString(); - _val15 = iprot.readString(); - this.operatorAttributes.put(_key14, _val15); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OPERATORCOUNTERS: - if (field.type == TType.MAP) { - { - TMap _map16 = iprot.readMapBegin(); - this.operatorCounters = new HashMap(2*_map16.size); - for (int _i17 = 0; _i17 < _map16.size; ++_i17) - { - String _key18; - long _val19; - _key18 = iprot.readString(); - _val19 = iprot.readI64(); - this.operatorCounters.put(_key18, _val19); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DONE: - if (field.type == TType.BOOL) { - this.done = iprot.readBool(); - this.__isset.done = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STARTED: - if (field.type == TType.BOOL) { - this.started = iprot.readBool(); - this.__isset.started = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.operatorId != null) { - oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); - oprot.writeString(this.operatorId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); - oprot.writeI32(this.operatorType); - 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()) { - oprot.writeString(_iter20.getKey()); - oprot.writeString(_iter20.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorCounters != null) { - oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.operatorCounters.size())); - for (Map.Entry _iter21 : this.operatorCounters.entrySet()) { - oprot.writeString(_iter21.getKey()); - oprot.writeI64(_iter21.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Operator("); - boolean first = true; - - sb.append("operatorId:"); - if (this.operatorId == null) { - sb.append("null"); - } else { - sb.append(this.operatorId); - } - 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(")"); - } - first = false; - if (!first) sb.append(", "); - sb.append("operatorAttributes:"); - if (this.operatorAttributes == null) { - sb.append("null"); - } else { - sb.append(this.operatorAttributes); - } - first = false; - if (!first) sb.append(", "); - sb.append("operatorCounters:"); - if (this.operatorCounters == null) { - sb.append("null"); - } else { - sb.append(this.operatorCounters); - } - first = false; - if (!first) sb.append(", "); - sb.append("done:"); - sb.append(this.done); - first = false; - if (!first) sb.append(", "); - sb.append("started:"); - sb.append(this.started); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index f175062..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - - -import java.util.HashMap; -import java.util.Map; - -import org.apache.thrift.IntRangeSet; - -public class OperatorType { - public static final int JOIN = 0; - public static final int MAPJOIN = 1; - public static final int EXTRACT = 2; - public static final int FILTER = 3; - public static final int FORWARD = 4; - public static final int GROUPBY = 5; - public static final int LIMIT = 6; - public static final int SCRIPT = 7; - public static final int SELECT = 8; - public static final int TABLESCAN = 9; - public static final int FILESINK = 10; - public static final int REDUCESINK = 11; - public static final int UNION = 12; - public static final int UDTF = 13; - public static final int LATERALVIEWJOIN = 14; - public static final int LATERALVIEWFORWARD = 15; - public static final int HASHTABLEDUMMY = 16; - public static final int HASHTABLESINK = 17; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - JOIN, - MAPJOIN, - EXTRACT, - FILTER, - FORWARD, - GROUPBY, - LIMIT, - SCRIPT, - SELECT, - TABLESCAN, - FILESINK, - REDUCESINK, - UNION, - UDTF, - LATERALVIEWJOIN, - LATERALVIEWFORWARD, - HASHTABLEDUMMY, - HASHTABLESINK); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(JOIN, "JOIN"); - put(MAPJOIN, "MAPJOIN"); - put(EXTRACT, "EXTRACT"); - put(FILTER, "FILTER"); - put(FORWARD, "FORWARD"); - put(GROUPBY, "GROUPBY"); - put(LIMIT, "LIMIT"); - put(SCRIPT, "SCRIPT"); - put(SELECT, "SELECT"); - put(TABLESCAN, "TABLESCAN"); - put(FILESINK, "FILESINK"); - put(REDUCESINK, "REDUCESINK"); - put(UNION, "UNION"); - put(UDTF, "UDTF"); - put(LATERALVIEWJOIN, "LATERALVIEWJOIN"); - put(LATERALVIEWFORWARD, "LATERALVIEWFORWARD"); - put(HASHTABLEDUMMY, "HASHTABLEDUMMY"); - put(HASHTABLESINK, "HASHTABLESINK"); - }}; -} 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 deleted file mode 100644 index 3ee94c3..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java +++ /dev/null @@ -1,814 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField QUERY_COUNTERS_FIELD_DESC = new TField("queryCounters", TType.MAP, (short)4); - private static final TField STAGE_GRAPH_FIELD_DESC = new TField("stageGraph", TType.STRUCT, (short)5); - private static final TField STAGE_LIST_FIELD_DESC = new TField("stageList", TType.LIST, (short)6); - private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7); - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERYID, new FieldMetaData("queryId", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(QUERYTYPE, new FieldMetaData("queryType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(QUERYATTRIBUTES, new FieldMetaData("queryAttributes", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(QUERYCOUNTERS, new FieldMetaData("queryCounters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.I64)))); - put(STAGEGRAPH, new FieldMetaData("stageGraph", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Graph.class))); - put(STAGELIST, new FieldMetaData("stageList", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Stage.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Query.class, metaDataMap); - } - - public Query() { - } - - public Query( - String queryId, - String queryType, - Map queryAttributes, - Map queryCounters, - Graph stageGraph, - List stageList, - boolean done, - boolean started) - { - this(); - this.queryId = queryId; - this.queryType = queryType; - this.queryAttributes = queryAttributes; - this.queryCounters = queryCounters; - this.stageGraph = stageGraph; - this.stageList = stageList; - this.done = done; - this.__isset.done = true; - this.started = started; - this.__isset.started = true; - } - - /** - * Performs a deep copy on other. - */ - public Query(Query other) { - if (other.isSetQueryId()) { - this.queryId = other.queryId; - } - if (other.isSetQueryType()) { - this.queryType = other.queryType; - } - if (other.isSetQueryAttributes()) { - Map __this__queryAttributes = new HashMap(); - for (Map.Entry other_element : other.queryAttributes.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__queryAttributes_copy_key = other_element_key; - - String __this__queryAttributes_copy_value = other_element_value; - - __this__queryAttributes.put(__this__queryAttributes_copy_key, __this__queryAttributes_copy_value); - } - this.queryAttributes = __this__queryAttributes; - } - if (other.isSetQueryCounters()) { - Map __this__queryCounters = new HashMap(); - for (Map.Entry other_element : other.queryCounters.entrySet()) { - - String other_element_key = other_element.getKey(); - Long other_element_value = other_element.getValue(); - - String __this__queryCounters_copy_key = other_element_key; - - Long __this__queryCounters_copy_value = other_element_value; - - __this__queryCounters.put(__this__queryCounters_copy_key, __this__queryCounters_copy_value); - } - this.queryCounters = __this__queryCounters; - } - if (other.isSetStageGraph()) { - this.stageGraph = new Graph(other.stageGraph); - } - if (other.isSetStageList()) { - List __this__stageList = new ArrayList(); - for (Stage other_element : other.stageList) { - __this__stageList.add(new Stage(other_element)); - } - this.stageList = __this__stageList; - } - __isset.done = other.__isset.done; - this.done = other.done; - __isset.started = other.__isset.started; - this.started = other.started; - } - - @Override - public Query clone() { - return new Query(this); - } - - public String getQueryId() { - return this.queryId; - } - - public void setQueryId(String queryId) { - this.queryId = queryId; - } - - public void unsetQueryId() { - this.queryId = null; - } - - // Returns true if field queryId is set (has been asigned a value) and false otherwise - public boolean isSetQueryId() { - return this.queryId != null; - } - - public String getQueryType() { - return this.queryType; - } - - public void setQueryType(String queryType) { - this.queryType = queryType; - } - - public void unsetQueryType() { - this.queryType = null; - } - - // Returns true if field queryType is set (has been asigned a value) and false otherwise - public boolean isSetQueryType() { - return this.queryType != null; - } - - public int getQueryAttributesSize() { - return (this.queryAttributes == null) ? 0 : this.queryAttributes.size(); - } - - public void putToQueryAttributes(String key, String val) { - if (this.queryAttributes == null) { - this.queryAttributes = new HashMap(); - } - this.queryAttributes.put(key, val); - } - - public Map getQueryAttributes() { - return this.queryAttributes; - } - - public void setQueryAttributes(Map queryAttributes) { - this.queryAttributes = queryAttributes; - } - - public void unsetQueryAttributes() { - this.queryAttributes = null; - } - - // Returns true if field queryAttributes is set (has been asigned a value) and false otherwise - public boolean isSetQueryAttributes() { - return this.queryAttributes != null; - } - - public int getQueryCountersSize() { - return (this.queryCounters == null) ? 0 : this.queryCounters.size(); - } - - public void putToQueryCounters(String key, long val) { - if (this.queryCounters == null) { - this.queryCounters = new HashMap(); - } - this.queryCounters.put(key, val); - } - - public Map getQueryCounters() { - return this.queryCounters; - } - - public void setQueryCounters(Map queryCounters) { - this.queryCounters = queryCounters; - } - - public void unsetQueryCounters() { - this.queryCounters = null; - } - - // Returns true if field queryCounters is set (has been asigned a value) and false otherwise - public boolean isSetQueryCounters() { - return this.queryCounters != null; - } - - public Graph getStageGraph() { - return this.stageGraph; - } - - public void setStageGraph(Graph stageGraph) { - this.stageGraph = stageGraph; - } - - public void unsetStageGraph() { - this.stageGraph = null; - } - - // Returns true if field stageGraph is set (has been asigned a value) and false otherwise - public boolean isSetStageGraph() { - return this.stageGraph != null; - } - - public int getStageListSize() { - return (this.stageList == null) ? 0 : this.stageList.size(); - } - - public java.util.Iterator getStageListIterator() { - return (this.stageList == null) ? null : this.stageList.iterator(); - } - - public void addToStageList(Stage elem) { - if (this.stageList == null) { - this.stageList = new ArrayList(); - } - this.stageList.add(elem); - } - - public List getStageList() { - return this.stageList; - } - - public void setStageList(List stageList) { - this.stageList = stageList; - } - - public void unsetStageList() { - this.stageList = null; - } - - // Returns true if field stageList is set (has been asigned a value) and false otherwise - public boolean isSetStageList() { - return this.stageList != null; - } - - public boolean isDone() { - return this.done; - } - - public void setDone(boolean done) { - this.done = done; - this.__isset.done = true; - } - - public void unsetDone() { - this.__isset.done = false; - } - - // Returns true if field done is set (has been asigned a value) and false otherwise - public boolean isSetDone() { - return this.__isset.done; - } - - public boolean isStarted() { - return this.started; - } - - public void setStarted(boolean started) { - this.started = started; - this.__isset.started = true; - } - - public void unsetStarted() { - this.__isset.started = false; - } - - // Returns true if field started is set (has been asigned a value) and false otherwise - public boolean isSetStarted() { - return this.__isset.started; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case QUERYID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((String)value); - } - break; - - case QUERYTYPE: - if (value == null) { - unsetQueryType(); - } else { - setQueryType((String)value); - } - break; - - case QUERYATTRIBUTES: - if (value == null) { - unsetQueryAttributes(); - } else { - setQueryAttributes((Map)value); - } - break; - - case QUERYCOUNTERS: - if (value == null) { - unsetQueryCounters(); - } else { - setQueryCounters((Map)value); - } - break; - - case STAGEGRAPH: - if (value == null) { - unsetStageGraph(); - } else { - setStageGraph((Graph)value); - } - break; - - case STAGELIST: - if (value == null) { - unsetStageList(); - } else { - setStageList((List)value); - } - break; - - case DONE: - if (value == null) { - unsetDone(); - } else { - setDone((Boolean)value); - } - break; - - case STARTED: - if (value == null) { - unsetStarted(); - } else { - setStarted((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case QUERYID: - return getQueryId(); - - case QUERYTYPE: - return getQueryType(); - - case QUERYATTRIBUTES: - return getQueryAttributes(); - - case QUERYCOUNTERS: - return getQueryCounters(); - - case STAGEGRAPH: - return getStageGraph(); - - case STAGELIST: - return getStageList(); - - case DONE: - return new Boolean(isDone()); - - case STARTED: - return new Boolean(isStarted()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case QUERYID: - return isSetQueryId(); - case QUERYTYPE: - return isSetQueryType(); - case QUERYATTRIBUTES: - return isSetQueryAttributes(); - case QUERYCOUNTERS: - return isSetQueryCounters(); - case STAGEGRAPH: - return isSetStageGraph(); - case STAGELIST: - return isSetStageList(); - case DONE: - return isSetDone(); - case STARTED: - return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Query) - return this.equals((Query)that); - return false; - } - - public boolean equals(Query that) { - if (that == null) - return false; - - boolean this_present_queryId = true && this.isSetQueryId(); - boolean that_present_queryId = true && that.isSetQueryId(); - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (!this.queryId.equals(that.queryId)) - return false; - } - - boolean this_present_queryType = true && this.isSetQueryType(); - boolean that_present_queryType = true && that.isSetQueryType(); - if (this_present_queryType || that_present_queryType) { - if (!(this_present_queryType && that_present_queryType)) - return false; - if (!this.queryType.equals(that.queryType)) - return false; - } - - boolean this_present_queryAttributes = true && this.isSetQueryAttributes(); - boolean that_present_queryAttributes = true && that.isSetQueryAttributes(); - if (this_present_queryAttributes || that_present_queryAttributes) { - if (!(this_present_queryAttributes && that_present_queryAttributes)) - return false; - if (!this.queryAttributes.equals(that.queryAttributes)) - return false; - } - - boolean this_present_queryCounters = true && this.isSetQueryCounters(); - boolean that_present_queryCounters = true && that.isSetQueryCounters(); - if (this_present_queryCounters || that_present_queryCounters) { - if (!(this_present_queryCounters && that_present_queryCounters)) - return false; - if (!this.queryCounters.equals(that.queryCounters)) - return false; - } - - boolean this_present_stageGraph = true && this.isSetStageGraph(); - boolean that_present_stageGraph = true && that.isSetStageGraph(); - if (this_present_stageGraph || that_present_stageGraph) { - if (!(this_present_stageGraph && that_present_stageGraph)) - return false; - if (!this.stageGraph.equals(that.stageGraph)) - return false; - } - - boolean this_present_stageList = true && this.isSetStageList(); - boolean that_present_stageList = true && that.isSetStageList(); - if (this_present_stageList || that_present_stageList) { - if (!(this_present_stageList && that_present_stageList)) - return false; - if (!this.stageList.equals(that.stageList)) - return false; - } - - boolean this_present_done = true; - boolean that_present_done = true; - if (this_present_done || that_present_done) { - if (!(this_present_done && that_present_done)) - return false; - if (this.done != that.done) - return false; - } - - boolean this_present_started = true; - boolean that_present_started = true; - if (this_present_started || that_present_started) { - if (!(this_present_started && that_present_started)) - return false; - if (this.started != that.started) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case QUERYID: - if (field.type == TType.STRING) { - this.queryId = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case QUERYTYPE: - if (field.type == TType.STRING) { - this.queryType = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case QUERYATTRIBUTES: - if (field.type == TType.MAP) { - { - TMap _map50 = iprot.readMapBegin(); - this.queryAttributes = new HashMap(2*_map50.size); - for (int _i51 = 0; _i51 < _map50.size; ++_i51) - { - String _key52; - String _val53; - _key52 = iprot.readString(); - _val53 = iprot.readString(); - this.queryAttributes.put(_key52, _val53); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case QUERYCOUNTERS: - if (field.type == TType.MAP) { - { - TMap _map54 = iprot.readMapBegin(); - this.queryCounters = new HashMap(2*_map54.size); - for (int _i55 = 0; _i55 < _map54.size; ++_i55) - { - String _key56; - long _val57; - _key56 = iprot.readString(); - _val57 = iprot.readI64(); - this.queryCounters.put(_key56, _val57); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STAGEGRAPH: - if (field.type == TType.STRUCT) { - this.stageGraph = new Graph(); - this.stageGraph.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STAGELIST: - if (field.type == TType.LIST) { - { - TList _list58 = iprot.readListBegin(); - this.stageList = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - Stage _elem60; - _elem60 = new Stage(); - _elem60.read(iprot); - this.stageList.add(_elem60); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DONE: - if (field.type == TType.BOOL) { - this.done = iprot.readBool(); - this.__isset.done = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STARTED: - if (field.type == TType.BOOL) { - this.started = iprot.readBool(); - this.__isset.started = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queryId != null) { - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeString(this.queryId); - oprot.writeFieldEnd(); - } - if (this.queryType != null) { - oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); - oprot.writeString(this.queryType); - oprot.writeFieldEnd(); - } - if (this.queryAttributes != null) { - oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.queryAttributes.size())); - for (Map.Entry _iter61 : this.queryAttributes.entrySet()) { - oprot.writeString(_iter61.getKey()); - oprot.writeString(_iter61.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.queryCounters != null) { - oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.queryCounters.size())); - for (Map.Entry _iter62 : this.queryCounters.entrySet()) { - oprot.writeString(_iter62.getKey()); - oprot.writeI64(_iter62.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageGraph != null) { - oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); - this.stageGraph.write(oprot); - oprot.writeFieldEnd(); - } - if (this.stageList != null) { - oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.stageList.size())); - for (Stage _iter63 : this.stageList) { - _iter63.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Query("); - boolean first = true; - - sb.append("queryId:"); - if (this.queryId == null) { - sb.append("null"); - } else { - sb.append(this.queryId); - } - first = false; - if (!first) sb.append(", "); - sb.append("queryType:"); - if (this.queryType == null) { - sb.append("null"); - } else { - sb.append(this.queryType); - } - first = false; - if (!first) sb.append(", "); - sb.append("queryAttributes:"); - if (this.queryAttributes == null) { - sb.append("null"); - } else { - sb.append(this.queryAttributes); - } - first = false; - if (!first) sb.append(", "); - sb.append("queryCounters:"); - if (this.queryCounters == null) { - sb.append("null"); - } else { - sb.append(this.queryCounters); - } - first = false; - if (!first) sb.append(", "); - sb.append("stageGraph:"); - if (this.stageGraph == null) { - sb.append("null"); - } else { - sb.append(this.stageGraph); - } - first = false; - if (!first) sb.append(", "); - sb.append("stageList:"); - if (this.stageList == null) { - sb.append("null"); - } else { - sb.append(this.stageList); - } - first = false; - if (!first) sb.append(", "); - sb.append("done:"); - sb.append(this.done); - first = false; - if (!first) sb.append(", "); - sb.append("started:"); - sb.append(this.started); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git 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 deleted file mode 100644 index 7ed9c4c..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERIES, new FieldMetaData("queries", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Query.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(QueryPlan.class, metaDataMap); - } - - public QueryPlan() { - } - - public QueryPlan( - List queries, - boolean done, - boolean started) - { - this(); - this.queries = queries; - this.done = done; - this.__isset.done = true; - this.started = started; - this.__isset.started = true; - } - - /** - * Performs a deep copy on other. - */ - public QueryPlan(QueryPlan other) { - if (other.isSetQueries()) { - List __this__queries = new ArrayList(); - for (Query other_element : other.queries) { - __this__queries.add(new Query(other_element)); - } - this.queries = __this__queries; - } - __isset.done = other.__isset.done; - this.done = other.done; - __isset.started = other.__isset.started; - this.started = other.started; - } - - @Override - public QueryPlan clone() { - return new QueryPlan(this); - } - - public int getQueriesSize() { - return (this.queries == null) ? 0 : this.queries.size(); - } - - public java.util.Iterator getQueriesIterator() { - return (this.queries == null) ? null : this.queries.iterator(); - } - - public void addToQueries(Query elem) { - if (this.queries == null) { - this.queries = new ArrayList(); - } - this.queries.add(elem); - } - - public List getQueries() { - return this.queries; - } - - public void setQueries(List queries) { - this.queries = queries; - } - - public void unsetQueries() { - this.queries = null; - } - - // Returns true if field queries is set (has been asigned a value) and false otherwise - public boolean isSetQueries() { - return this.queries != null; - } - - public boolean isDone() { - return this.done; - } - - public void setDone(boolean done) { - this.done = done; - this.__isset.done = true; - } - - public void unsetDone() { - this.__isset.done = false; - } - - // Returns true if field done is set (has been asigned a value) and false otherwise - public boolean isSetDone() { - return this.__isset.done; - } - - public boolean isStarted() { - return this.started; - } - - public void setStarted(boolean started) { - this.started = started; - this.__isset.started = true; - } - - public void unsetStarted() { - this.__isset.started = false; - } - - // Returns true if field started is set (has been asigned a value) and false otherwise - public boolean isSetStarted() { - return this.__isset.started; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case QUERIES: - if (value == null) { - unsetQueries(); - } else { - setQueries((List)value); - } - break; - - case DONE: - if (value == null) { - unsetDone(); - } else { - setDone((Boolean)value); - } - break; - - case STARTED: - if (value == null) { - unsetStarted(); - } else { - setStarted((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case QUERIES: - return getQueries(); - - case DONE: - return new Boolean(isDone()); - - case STARTED: - return new Boolean(isStarted()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case QUERIES: - return isSetQueries(); - case DONE: - return isSetDone(); - case STARTED: - return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof QueryPlan) - return this.equals((QueryPlan)that); - return false; - } - - public boolean equals(QueryPlan that) { - if (that == null) - return false; - - boolean this_present_queries = true && this.isSetQueries(); - boolean that_present_queries = true && that.isSetQueries(); - if (this_present_queries || that_present_queries) { - if (!(this_present_queries && that_present_queries)) - return false; - if (!this.queries.equals(that.queries)) - return false; - } - - boolean this_present_done = true; - boolean that_present_done = true; - if (this_present_done || that_present_done) { - if (!(this_present_done && that_present_done)) - return false; - if (this.done != that.done) - return false; - } - - boolean this_present_started = true; - boolean that_present_started = true; - if (this_present_started || that_present_started) { - if (!(this_present_started && that_present_started)) - return false; - if (this.started != that.started) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case QUERIES: - if (field.type == TType.LIST) { - { - TList _list64 = iprot.readListBegin(); - this.queries = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) - { - Query _elem66; - _elem66 = new Query(); - _elem66.read(iprot); - this.queries.add(_elem66); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DONE: - if (field.type == TType.BOOL) { - this.done = iprot.readBool(); - this.__isset.done = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STARTED: - if (field.type == TType.BOOL) { - this.started = iprot.readBool(); - this.__isset.started = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queries != null) { - oprot.writeFieldBegin(QUERIES_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.queries.size())); - for (Query _iter67 : this.queries) { - _iter67.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("QueryPlan("); - boolean first = true; - - sb.append("queries:"); - if (this.queries == null) { - sb.append("null"); - } else { - sb.append(this.queries); - } - first = false; - if (!first) sb.append(", "); - sb.append("done:"); - sb.append(this.done); - first = false; - if (!first) sb.append(", "); - sb.append("started:"); - sb.append(this.started); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git 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 deleted file mode 100644 index 7d2bf61..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java +++ /dev/null @@ -1,752 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField STAGE_COUNTERS_FIELD_DESC = new TField("stageCounters", TType.MAP, (short)4); - private static final TField TASK_LIST_FIELD_DESC = new TField("taskList", TType.LIST, (short)5); - private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)6); - 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 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(STAGEID, 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, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(STAGECOUNTERS, new FieldMetaData("stageCounters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.I64)))); - put(TASKLIST, new FieldMetaData("taskList", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Task.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Stage.class, metaDataMap); - } - - public Stage() { - } - - public Stage( - String stageId, - int stageType, - Map stageAttributes, - Map stageCounters, - List taskList, - boolean done, - boolean started) - { - 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; - this.started = started; - this.__isset.started = true; - } - - /** - * Performs a deep copy on other. - */ - public Stage(Stage other) { - if (other.isSetStageId()) { - this.stageId = other.stageId; - } - __isset.stageType = other.__isset.stageType; - this.stageType = other.stageType; - if (other.isSetStageAttributes()) { - Map __this__stageAttributes = new HashMap(); - for (Map.Entry other_element : other.stageAttributes.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__stageAttributes_copy_key = other_element_key; - - String __this__stageAttributes_copy_value = other_element_value; - - __this__stageAttributes.put(__this__stageAttributes_copy_key, __this__stageAttributes_copy_value); - } - this.stageAttributes = __this__stageAttributes; - } - if (other.isSetStageCounters()) { - Map __this__stageCounters = new HashMap(); - for (Map.Entry other_element : other.stageCounters.entrySet()) { - - String other_element_key = other_element.getKey(); - Long other_element_value = other_element.getValue(); - - String __this__stageCounters_copy_key = other_element_key; - - Long __this__stageCounters_copy_value = other_element_value; - - __this__stageCounters.put(__this__stageCounters_copy_key, __this__stageCounters_copy_value); - } - this.stageCounters = __this__stageCounters; - } - if (other.isSetTaskList()) { - List __this__taskList = new ArrayList(); - for (Task other_element : other.taskList) { - __this__taskList.add(new Task(other_element)); - } - this.taskList = __this__taskList; - } - __isset.done = other.__isset.done; - this.done = other.done; - __isset.started = other.__isset.started; - this.started = other.started; - } - - @Override - public Stage clone() { - return new Stage(this); - } - - public String getStageId() { - return this.stageId; - } - - public void setStageId(String stageId) { - this.stageId = stageId; - } - - public void unsetStageId() { - this.stageId = null; - } - - // 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() { - return this.stageType; - } - - public void setStageType(int stageType) { - this.stageType = stageType; - this.__isset.stageType = true; - } - - public void unsetStageType() { - this.__isset.stageType = false; - } - - // Returns true if field stageType is set (has been asigned a value) and false otherwise - public boolean isSetStageType() { - return this.__isset.stageType; - } - - public int getStageAttributesSize() { - return (this.stageAttributes == null) ? 0 : this.stageAttributes.size(); - } - - public void putToStageAttributes(String key, String val) { - if (this.stageAttributes == null) { - this.stageAttributes = new HashMap(); - } - this.stageAttributes.put(key, val); - } - - public Map getStageAttributes() { - return this.stageAttributes; - } - - public void setStageAttributes(Map stageAttributes) { - this.stageAttributes = stageAttributes; - } - - public void unsetStageAttributes() { - this.stageAttributes = null; - } - - // Returns true if field stageAttributes is set (has been asigned a value) and false otherwise - public boolean isSetStageAttributes() { - return this.stageAttributes != null; - } - - public int getStageCountersSize() { - return (this.stageCounters == null) ? 0 : this.stageCounters.size(); - } - - public void putToStageCounters(String key, long val) { - if (this.stageCounters == null) { - this.stageCounters = new HashMap(); - } - this.stageCounters.put(key, val); - } - - public Map getStageCounters() { - return this.stageCounters; - } - - public void setStageCounters(Map stageCounters) { - this.stageCounters = stageCounters; - } - - public void unsetStageCounters() { - this.stageCounters = null; - } - - // Returns true if field stageCounters is set (has been asigned a value) and false otherwise - public boolean isSetStageCounters() { - return this.stageCounters != null; - } - - public int getTaskListSize() { - return (this.taskList == null) ? 0 : this.taskList.size(); - } - - public java.util.Iterator getTaskListIterator() { - return (this.taskList == null) ? null : this.taskList.iterator(); - } - - public void addToTaskList(Task elem) { - if (this.taskList == null) { - this.taskList = new ArrayList(); - } - this.taskList.add(elem); - } - - public List getTaskList() { - return this.taskList; - } - - public void setTaskList(List taskList) { - this.taskList = taskList; - } - - public void unsetTaskList() { - this.taskList = null; - } - - // Returns true if field taskList is set (has been asigned a value) and false otherwise - public boolean isSetTaskList() { - return this.taskList != null; - } - - public boolean isDone() { - return this.done; - } - - public void setDone(boolean done) { - this.done = done; - this.__isset.done = true; - } - - public void unsetDone() { - this.__isset.done = false; - } - - // Returns true if field done is set (has been asigned a value) and false otherwise - public boolean isSetDone() { - return this.__isset.done; - } - - public boolean isStarted() { - return this.started; - } - - public void setStarted(boolean started) { - this.started = started; - this.__isset.started = true; - } - - public void unsetStarted() { - this.__isset.started = false; - } - - // Returns true if field started is set (has been asigned a value) and false otherwise - public boolean isSetStarted() { - return this.__isset.started; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case STAGEID: - if (value == null) { - unsetStageId(); - } else { - setStageId((String)value); - } - break; - - case STAGETYPE: - if (value == null) { - unsetStageType(); - } else { - setStageType((Integer)value); - } - break; - - case STAGEATTRIBUTES: - if (value == null) { - unsetStageAttributes(); - } else { - setStageAttributes((Map)value); - } - break; - - case STAGECOUNTERS: - if (value == null) { - unsetStageCounters(); - } else { - setStageCounters((Map)value); - } - break; - - case TASKLIST: - if (value == null) { - unsetTaskList(); - } else { - setTaskList((List)value); - } - break; - - case DONE: - if (value == null) { - unsetDone(); - } else { - setDone((Boolean)value); - } - break; - - case STARTED: - if (value == null) { - unsetStarted(); - } else { - setStarted((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case STAGEID: - return getStageId(); - - case STAGETYPE: - return getStageType(); - - case STAGEATTRIBUTES: - return getStageAttributes(); - - case STAGECOUNTERS: - return getStageCounters(); - - case TASKLIST: - return getTaskList(); - - case DONE: - return new Boolean(isDone()); - - case STARTED: - return new Boolean(isStarted()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case STAGEID: - return isSetStageId(); - case STAGETYPE: - return isSetStageType(); - case STAGEATTRIBUTES: - return isSetStageAttributes(); - case STAGECOUNTERS: - return isSetStageCounters(); - case TASKLIST: - return isSetTaskList(); - case DONE: - return isSetDone(); - case STARTED: - return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Stage) - return this.equals((Stage)that); - return false; - } - - public boolean equals(Stage that) { - if (that == null) - return false; - - boolean this_present_stageId = true && this.isSetStageId(); - boolean that_present_stageId = true && that.isSetStageId(); - if (this_present_stageId || that_present_stageId) { - if (!(this_present_stageId && that_present_stageId)) - return false; - if (!this.stageId.equals(that.stageId)) - return false; - } - - boolean this_present_stageType = true; - boolean that_present_stageType = true; - if (this_present_stageType || that_present_stageType) { - if (!(this_present_stageType && that_present_stageType)) - return false; - if (this.stageType != that.stageType) - return false; - } - - boolean this_present_stageAttributes = true && this.isSetStageAttributes(); - boolean that_present_stageAttributes = true && that.isSetStageAttributes(); - if (this_present_stageAttributes || that_present_stageAttributes) { - if (!(this_present_stageAttributes && that_present_stageAttributes)) - return false; - if (!this.stageAttributes.equals(that.stageAttributes)) - return false; - } - - boolean this_present_stageCounters = true && this.isSetStageCounters(); - boolean that_present_stageCounters = true && that.isSetStageCounters(); - if (this_present_stageCounters || that_present_stageCounters) { - if (!(this_present_stageCounters && that_present_stageCounters)) - return false; - if (!this.stageCounters.equals(that.stageCounters)) - return false; - } - - boolean this_present_taskList = true && this.isSetTaskList(); - boolean that_present_taskList = true && that.isSetTaskList(); - if (this_present_taskList || that_present_taskList) { - if (!(this_present_taskList && that_present_taskList)) - return false; - if (!this.taskList.equals(that.taskList)) - return false; - } - - boolean this_present_done = true; - boolean that_present_done = true; - if (this_present_done || that_present_done) { - if (!(this_present_done && that_present_done)) - return false; - if (this.done != that.done) - return false; - } - - boolean this_present_started = true; - boolean that_present_started = true; - if (this_present_started || that_present_started) { - if (!(this_present_started && that_present_started)) - return false; - if (this.started != that.started) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case STAGEID: - if (field.type == TType.STRING) { - this.stageId = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STAGETYPE: - if (field.type == TType.I32) { - this.stageType = iprot.readI32(); - this.__isset.stageType = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STAGEATTRIBUTES: - if (field.type == TType.MAP) { - { - TMap _map36 = iprot.readMapBegin(); - this.stageAttributes = new HashMap(2*_map36.size); - for (int _i37 = 0; _i37 < _map36.size; ++_i37) - { - String _key38; - String _val39; - _key38 = iprot.readString(); - _val39 = iprot.readString(); - this.stageAttributes.put(_key38, _val39); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STAGECOUNTERS: - if (field.type == TType.MAP) { - { - TMap _map40 = iprot.readMapBegin(); - this.stageCounters = new HashMap(2*_map40.size); - for (int _i41 = 0; _i41 < _map40.size; ++_i41) - { - String _key42; - long _val43; - _key42 = iprot.readString(); - _val43 = iprot.readI64(); - this.stageCounters.put(_key42, _val43); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TASKLIST: - if (field.type == TType.LIST) { - { - TList _list44 = iprot.readListBegin(); - this.taskList = new ArrayList(_list44.size); - for (int _i45 = 0; _i45 < _list44.size; ++_i45) - { - Task _elem46; - _elem46 = new Task(); - _elem46.read(iprot); - this.taskList.add(_elem46); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DONE: - if (field.type == TType.BOOL) { - this.done = iprot.readBool(); - this.__isset.done = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STARTED: - if (field.type == TType.BOOL) { - this.started = iprot.readBool(); - this.__isset.started = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.stageId != null) { - oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); - oprot.writeString(this.stageId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); - oprot.writeI32(this.stageType); - 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()) { - oprot.writeString(_iter47.getKey()); - oprot.writeString(_iter47.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageCounters != null) { - oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.stageCounters.size())); - for (Map.Entry _iter48 : this.stageCounters.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeI64(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskList != null) { - oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.taskList.size())); - for (Task _iter49 : this.taskList) { - _iter49.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Stage("); - boolean first = true; - - sb.append("stageId:"); - if (this.stageId == null) { - sb.append("null"); - } else { - sb.append(this.stageId); - } - 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(")"); - } - first = false; - if (!first) sb.append(", "); - sb.append("stageAttributes:"); - if (this.stageAttributes == null) { - sb.append("null"); - } else { - sb.append(this.stageAttributes); - } - first = false; - if (!first) sb.append(", "); - sb.append("stageCounters:"); - if (this.stageCounters == null) { - sb.append("null"); - } else { - sb.append(this.stageCounters); - } - first = false; - if (!first) sb.append(", "); - sb.append("taskList:"); - if (this.taskList == null) { - sb.append("null"); - } else { - sb.append(this.taskList); - } - first = false; - if (!first) sb.append(", "); - sb.append("done:"); - sb.append(this.done); - first = false; - if (!first) sb.append(", "); - sb.append("started:"); - sb.append(this.started); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index 7950551..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - - -import java.util.HashMap; -import java.util.Map; - -import org.apache.thrift.IntRangeSet; - -public class StageType { - public static final int CONDITIONAL = 0; - public static final int COPY = 1; - public static final int DDL = 2; - public static final int MAPRED = 3; - public static final int EXPLAIN = 4; - public static final int FETCH = 5; - public static final int FUNC = 6; - public static final int MAPREDLOCAL = 7; - public static final int MOVE = 8; - public static final int STATS = 9; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - CONDITIONAL, - COPY, - DDL, - MAPRED, - EXPLAIN, - FETCH, - FUNC, - MAPREDLOCAL, - MOVE, - STATS); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(CONDITIONAL, "CONDITIONAL"); - put(COPY, "COPY"); - put(DDL, "DDL"); - put(MAPRED, "MAPRED"); - put(EXPLAIN, "EXPLAIN"); - put(FETCH, "FETCH"); - put(FUNC, "FUNC"); - put(MAPREDLOCAL, "MAPREDLOCAL"); - put(MOVE, "MOVE"); - put(STATS, "STATS"); - }}; -} 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 deleted file mode 100644 index 3e6c79c..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java +++ /dev/null @@ -1,830 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.ql.plan.api; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField TASK_COUNTERS_FIELD_DESC = new TField("taskCounters", TType.MAP, (short)4); - private static final TField OPERATOR_GRAPH_FIELD_DESC = new TField("operatorGraph", TType.STRUCT, (short)5); - private static final TField OPERATOR_LIST_FIELD_DESC = new TField("operatorList", TType.LIST, (short)6); - private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7); - 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 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TASKID, 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, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(TASKCOUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.I64)))); - put(OPERATORGRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, - new StructMetaData(TType.STRUCT, Graph.class))); - put(OPERATORLIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Operator.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap); - } - - public Task() { - } - - public Task( - String taskId, - int 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; - this.started = started; - this.__isset.started = true; - } - - /** - * Performs a deep copy on other. - */ - public Task(Task other) { - if (other.isSetTaskId()) { - this.taskId = other.taskId; - } - __isset.taskType = other.__isset.taskType; - this.taskType = other.taskType; - if (other.isSetTaskAttributes()) { - Map __this__taskAttributes = new HashMap(); - for (Map.Entry other_element : other.taskAttributes.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__taskAttributes_copy_key = other_element_key; - - String __this__taskAttributes_copy_value = other_element_value; - - __this__taskAttributes.put(__this__taskAttributes_copy_key, __this__taskAttributes_copy_value); - } - this.taskAttributes = __this__taskAttributes; - } - if (other.isSetTaskCounters()) { - Map __this__taskCounters = new HashMap(); - for (Map.Entry other_element : other.taskCounters.entrySet()) { - - String other_element_key = other_element.getKey(); - Long other_element_value = other_element.getValue(); - - String __this__taskCounters_copy_key = other_element_key; - - Long __this__taskCounters_copy_value = other_element_value; - - __this__taskCounters.put(__this__taskCounters_copy_key, __this__taskCounters_copy_value); - } - this.taskCounters = __this__taskCounters; - } - if (other.isSetOperatorGraph()) { - this.operatorGraph = new Graph(other.operatorGraph); - } - if (other.isSetOperatorList()) { - List __this__operatorList = new ArrayList(); - for (Operator other_element : other.operatorList) { - __this__operatorList.add(new Operator(other_element)); - } - this.operatorList = __this__operatorList; - } - __isset.done = other.__isset.done; - this.done = other.done; - __isset.started = other.__isset.started; - this.started = other.started; - } - - @Override - public Task clone() { - return new Task(this); - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public void unsetTaskId() { - this.taskId = null; - } - - // 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() { - return this.taskType; - } - - public void setTaskType(int taskType) { - this.taskType = taskType; - this.__isset.taskType = true; - } - - public void unsetTaskType() { - this.__isset.taskType = false; - } - - // Returns true if field taskType is set (has been asigned a value) and false otherwise - public boolean isSetTaskType() { - return this.__isset.taskType; - } - - public int getTaskAttributesSize() { - return (this.taskAttributes == null) ? 0 : this.taskAttributes.size(); - } - - public void putToTaskAttributes(String key, String val) { - if (this.taskAttributes == null) { - this.taskAttributes = new HashMap(); - } - this.taskAttributes.put(key, val); - } - - public Map getTaskAttributes() { - return this.taskAttributes; - } - - public void setTaskAttributes(Map taskAttributes) { - this.taskAttributes = taskAttributes; - } - - public void unsetTaskAttributes() { - this.taskAttributes = null; - } - - // Returns true if field taskAttributes is set (has been asigned a value) and false otherwise - public boolean isSetTaskAttributes() { - return this.taskAttributes != null; - } - - public int getTaskCountersSize() { - return (this.taskCounters == null) ? 0 : this.taskCounters.size(); - } - - public void putToTaskCounters(String key, long val) { - if (this.taskCounters == null) { - this.taskCounters = new HashMap(); - } - this.taskCounters.put(key, val); - } - - public Map getTaskCounters() { - return this.taskCounters; - } - - public void setTaskCounters(Map taskCounters) { - this.taskCounters = taskCounters; - } - - public void unsetTaskCounters() { - this.taskCounters = null; - } - - // Returns true if field taskCounters is set (has been asigned a value) and false otherwise - public boolean isSetTaskCounters() { - return this.taskCounters != null; - } - - public Graph getOperatorGraph() { - return this.operatorGraph; - } - - public void setOperatorGraph(Graph operatorGraph) { - this.operatorGraph = operatorGraph; - } - - public void unsetOperatorGraph() { - this.operatorGraph = null; - } - - // Returns true if field operatorGraph is set (has been asigned a value) and false otherwise - public boolean isSetOperatorGraph() { - return this.operatorGraph != null; - } - - public int getOperatorListSize() { - return (this.operatorList == null) ? 0 : this.operatorList.size(); - } - - public java.util.Iterator getOperatorListIterator() { - return (this.operatorList == null) ? null : this.operatorList.iterator(); - } - - public void addToOperatorList(Operator elem) { - if (this.operatorList == null) { - this.operatorList = new ArrayList(); - } - this.operatorList.add(elem); - } - - public List getOperatorList() { - return this.operatorList; - } - - public void setOperatorList(List operatorList) { - this.operatorList = operatorList; - } - - public void unsetOperatorList() { - this.operatorList = null; - } - - // Returns true if field operatorList is set (has been asigned a value) and false otherwise - public boolean isSetOperatorList() { - return this.operatorList != null; - } - - public boolean isDone() { - return this.done; - } - - public void setDone(boolean done) { - this.done = done; - this.__isset.done = true; - } - - public void unsetDone() { - this.__isset.done = false; - } - - // Returns true if field done is set (has been asigned a value) and false otherwise - public boolean isSetDone() { - return this.__isset.done; - } - - public boolean isStarted() { - return this.started; - } - - public void setStarted(boolean started) { - this.started = started; - this.__isset.started = true; - } - - public void unsetStarted() { - this.__isset.started = false; - } - - // Returns true if field started is set (has been asigned a value) and false otherwise - public boolean isSetStarted() { - return this.__isset.started; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TASKID: - if (value == null) { - unsetTaskId(); - } else { - setTaskId((String)value); - } - break; - - case TASKTYPE: - if (value == null) { - unsetTaskType(); - } else { - setTaskType((Integer)value); - } - break; - - case TASKATTRIBUTES: - if (value == null) { - unsetTaskAttributes(); - } else { - setTaskAttributes((Map)value); - } - break; - - case TASKCOUNTERS: - if (value == null) { - unsetTaskCounters(); - } else { - setTaskCounters((Map)value); - } - break; - - case OPERATORGRAPH: - if (value == null) { - unsetOperatorGraph(); - } else { - setOperatorGraph((Graph)value); - } - break; - - case OPERATORLIST: - if (value == null) { - unsetOperatorList(); - } else { - setOperatorList((List)value); - } - break; - - case DONE: - if (value == null) { - unsetDone(); - } else { - setDone((Boolean)value); - } - break; - - case STARTED: - if (value == null) { - unsetStarted(); - } else { - setStarted((Boolean)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TASKID: - return getTaskId(); - - case TASKTYPE: - return getTaskType(); - - case TASKATTRIBUTES: - return getTaskAttributes(); - - case TASKCOUNTERS: - return getTaskCounters(); - - case OPERATORGRAPH: - return getOperatorGraph(); - - case OPERATORLIST: - return getOperatorList(); - - case DONE: - return new Boolean(isDone()); - - case STARTED: - return new Boolean(isStarted()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TASKID: - return isSetTaskId(); - case TASKTYPE: - return isSetTaskType(); - case TASKATTRIBUTES: - return isSetTaskAttributes(); - case TASKCOUNTERS: - return isSetTaskCounters(); - case OPERATORGRAPH: - return isSetOperatorGraph(); - case OPERATORLIST: - return isSetOperatorList(); - case DONE: - return isSetDone(); - case STARTED: - return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Task) - return this.equals((Task)that); - return false; - } - - public boolean equals(Task that) { - if (that == null) - return false; - - boolean this_present_taskId = true && this.isSetTaskId(); - boolean that_present_taskId = true && that.isSetTaskId(); - if (this_present_taskId || that_present_taskId) { - if (!(this_present_taskId && that_present_taskId)) - return false; - if (!this.taskId.equals(that.taskId)) - return false; - } - - boolean this_present_taskType = true; - boolean that_present_taskType = true; - if (this_present_taskType || that_present_taskType) { - if (!(this_present_taskType && that_present_taskType)) - return false; - if (this.taskType != that.taskType) - return false; - } - - boolean this_present_taskAttributes = true && this.isSetTaskAttributes(); - boolean that_present_taskAttributes = true && that.isSetTaskAttributes(); - if (this_present_taskAttributes || that_present_taskAttributes) { - if (!(this_present_taskAttributes && that_present_taskAttributes)) - return false; - if (!this.taskAttributes.equals(that.taskAttributes)) - return false; - } - - boolean this_present_taskCounters = true && this.isSetTaskCounters(); - boolean that_present_taskCounters = true && that.isSetTaskCounters(); - if (this_present_taskCounters || that_present_taskCounters) { - if (!(this_present_taskCounters && that_present_taskCounters)) - return false; - if (!this.taskCounters.equals(that.taskCounters)) - return false; - } - - boolean this_present_operatorGraph = true && this.isSetOperatorGraph(); - boolean that_present_operatorGraph = true && that.isSetOperatorGraph(); - if (this_present_operatorGraph || that_present_operatorGraph) { - if (!(this_present_operatorGraph && that_present_operatorGraph)) - return false; - if (!this.operatorGraph.equals(that.operatorGraph)) - return false; - } - - boolean this_present_operatorList = true && this.isSetOperatorList(); - boolean that_present_operatorList = true && that.isSetOperatorList(); - if (this_present_operatorList || that_present_operatorList) { - if (!(this_present_operatorList && that_present_operatorList)) - return false; - if (!this.operatorList.equals(that.operatorList)) - return false; - } - - boolean this_present_done = true; - boolean that_present_done = true; - if (this_present_done || that_present_done) { - if (!(this_present_done && that_present_done)) - return false; - if (this.done != that.done) - return false; - } - - boolean this_present_started = true; - boolean that_present_started = true; - if (this_present_started || that_present_started) { - if (!(this_present_started && that_present_started)) - return false; - if (this.started != that.started) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TASKID: - if (field.type == TType.STRING) { - this.taskId = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TASKTYPE: - if (field.type == TType.I32) { - this.taskType = iprot.readI32(); - this.__isset.taskType = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TASKATTRIBUTES: - if (field.type == TType.MAP) { - { - TMap _map22 = iprot.readMapBegin(); - this.taskAttributes = new HashMap(2*_map22.size); - for (int _i23 = 0; _i23 < _map22.size; ++_i23) - { - String _key24; - String _val25; - _key24 = iprot.readString(); - _val25 = iprot.readString(); - this.taskAttributes.put(_key24, _val25); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TASKCOUNTERS: - if (field.type == TType.MAP) { - { - TMap _map26 = iprot.readMapBegin(); - this.taskCounters = new HashMap(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) - { - String _key28; - long _val29; - _key28 = iprot.readString(); - _val29 = iprot.readI64(); - this.taskCounters.put(_key28, _val29); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OPERATORGRAPH: - if (field.type == TType.STRUCT) { - this.operatorGraph = new Graph(); - this.operatorGraph.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case OPERATORLIST: - if (field.type == TType.LIST) { - { - TList _list30 = iprot.readListBegin(); - this.operatorList = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) - { - Operator _elem32; - _elem32 = new Operator(); - _elem32.read(iprot); - this.operatorList.add(_elem32); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DONE: - if (field.type == TType.BOOL) { - this.done = iprot.readBool(); - this.__isset.done = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STARTED: - if (field.type == TType.BOOL) { - this.started = iprot.readBool(); - this.__isset.started = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.taskId != null) { - oprot.writeFieldBegin(TASK_ID_FIELD_DESC); - oprot.writeString(this.taskId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); - oprot.writeI32(this.taskType); - 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()) { - oprot.writeString(_iter33.getKey()); - oprot.writeString(_iter33.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskCounters != null) { - oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.taskCounters.size())); - for (Map.Entry _iter34 : this.taskCounters.entrySet()) { - oprot.writeString(_iter34.getKey()); - oprot.writeI64(_iter34.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorGraph != null) { - if (isSetOperatorGraph()) { - oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); - this.operatorGraph.write(oprot); - oprot.writeFieldEnd(); - } - } - if (this.operatorList != null) { - if (isSetOperatorList()) { - oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.operatorList.size())); - for (Operator _iter35 : this.operatorList) { - _iter35.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Task("); - boolean first = true; - - sb.append("taskId:"); - if (this.taskId == null) { - sb.append("null"); - } else { - sb.append(this.taskId); - } - 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(")"); - } - first = false; - if (!first) sb.append(", "); - sb.append("taskAttributes:"); - if (this.taskAttributes == null) { - sb.append("null"); - } else { - sb.append(this.taskAttributes); - } - first = false; - if (!first) sb.append(", "); - sb.append("taskCounters:"); - if (this.taskCounters == null) { - sb.append("null"); - } else { - sb.append(this.taskCounters); - } - first = false; - if (isSetOperatorGraph()) { - if (!first) sb.append(", "); - sb.append("operatorGraph:"); - if (this.operatorGraph == null) { - sb.append("null"); - } else { - sb.append(this.operatorGraph); - } - first = false; - } - if (isSetOperatorList()) { - if (!first) sb.append(", "); - sb.append("operatorList:"); - if (this.operatorList == null) { - sb.append("null"); - } else { - sb.append(this.operatorList); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("done:"); - sb.append(this.done); - first = false; - if (!first) sb.append(", "); - sb.append("started:"); - sb.append(this.started); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index 4a04117..0000000 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -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; - -public class TaskType { - public static final int MAP = 0; - public static final int REDUCE = 1; - public static final int OTHER = 2; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - MAP, - REDUCE, - OTHER ); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(MAP, "MAP"); - put(REDUCE, "REDUCE"); - put(OTHER, "OTHER"); - }}; -} 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/queryplan/__init__.py ql/src/gen-py/queryplan/__init__.py deleted file mode 100644 index adefd8e..0000000 --- ql/src/gen-py/queryplan/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants'] diff --git ql/src/gen-py/queryplan/constants.py ql/src/gen-py/queryplan/constants.py deleted file mode 100644 index 2f17ec3..0000000 --- ql/src/gen-py/queryplan/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 ql/src/gen-py/queryplan/ttypes.py ql/src/gen-py/queryplan/ttypes.py deleted file mode 100644 index 45987a9..0000000 --- ql/src/gen-py/queryplan/ttypes.py +++ /dev/null @@ -1,965 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class AdjacencyType: - CONJUNCTIVE = 0 - DISJUNCTIVE = 1 - -class NodeType: - OPERATOR = 0 - STAGE = 1 - -class OperatorType: - JOIN = 0 - MAPJOIN = 1 - EXTRACT = 2 - FILTER = 3 - FORWARD = 4 - GROUPBY = 5 - LIMIT = 6 - SCRIPT = 7 - SELECT = 8 - TABLESCAN = 9 - FILESINK = 10 - REDUCESINK = 11 - UNION = 12 - UDTF = 13 - LATERALVIEWJOIN = 14 - LATERALVIEWFORWARD = 15 - -class TaskType: - MAP = 0 - REDUCE = 1 - OTHER = 2 - -class StageType: - CONDITIONAL = 0 - COPY = 1 - DDL = 2 - MAPRED = 3 - EXPLAIN = 4 - FETCH = 5 - FUNC = 6 - MAPREDLOCAL = 7 - MOVE = 8 - -class Adjacency: - """ - Attributes: - - node - - children - - adjacencyType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'node', None, None, ), # 1 - (2, TType.LIST, 'children', (TType.STRING,None), None, ), # 2 - (3, TType.I32, 'adjacencyType', None, None, ), # 3 - ) - - def __init__(self, node=None, children=None, adjacencyType=None,): - self.node = node - self.children = children - self.adjacencyType = adjacencyType - - 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.node = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.children = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = iprot.readString(); - self.children.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.adjacencyType = 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('Adjacency') - if self.node != None: - oprot.writeFieldBegin('node', TType.STRING, 1) - oprot.writeString(self.node) - oprot.writeFieldEnd() - if self.children != None: - oprot.writeFieldBegin('children', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.children)) - for iter6 in self.children: - oprot.writeString(iter6) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.adjacencyType != None: - oprot.writeFieldBegin('adjacencyType', TType.I32, 3) - oprot.writeI32(self.adjacencyType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Graph: - """ - Attributes: - - nodeType - - roots - - adjacencyList - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'nodeType', None, None, ), # 1 - (2, TType.LIST, 'roots', (TType.STRING,None), None, ), # 2 - (3, TType.LIST, 'adjacencyList', (TType.STRUCT,(Adjacency, Adjacency.thrift_spec)), None, ), # 3 - ) - - def __init__(self, nodeType=None, roots=None, adjacencyList=None,): - self.nodeType = nodeType - self.roots = roots - self.adjacencyList = adjacencyList - - 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.nodeType = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.roots = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in xrange(_size7): - _elem12 = iprot.readString(); - self.roots.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.adjacencyList = [] - (_etype16, _size13) = iprot.readListBegin() - for _i17 in xrange(_size13): - _elem18 = Adjacency() - _elem18.read(iprot) - self.adjacencyList.append(_elem18) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Graph') - if self.nodeType != None: - oprot.writeFieldBegin('nodeType', TType.I32, 1) - oprot.writeI32(self.nodeType) - oprot.writeFieldEnd() - if self.roots != None: - oprot.writeFieldBegin('roots', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.roots)) - for iter19 in self.roots: - oprot.writeString(iter19) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.adjacencyList != None: - oprot.writeFieldBegin('adjacencyList', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.adjacencyList)) - for iter20 in self.adjacencyList: - iter20.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Operator: - """ - Attributes: - - operatorId - - operatorType - - operatorAttributes - - operatorCounters - - done - - started - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'operatorId', None, None, ), # 1 - (2, TType.I32, 'operatorType', None, None, ), # 2 - (3, TType.MAP, 'operatorAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'operatorCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 - (5, TType.BOOL, 'done', None, None, ), # 5 - (6, TType.BOOL, 'started', None, None, ), # 6 - ) - - def __init__(self, operatorId=None, operatorType=None, operatorAttributes=None, operatorCounters=None, done=None, started=None,): - self.operatorId = operatorId - self.operatorType = operatorType - self.operatorAttributes = operatorAttributes - self.operatorCounters = operatorCounters - self.done = done - self.started = started - - 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.operatorId = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.operatorType = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.operatorAttributes = {} - (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() - for _i25 in xrange(_size21): - _key26 = iprot.readString(); - _val27 = iprot.readString(); - self.operatorAttributes[_key26] = _val27 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.operatorCounters = {} - (_ktype29, _vtype30, _size28 ) = iprot.readMapBegin() - for _i32 in xrange(_size28): - _key33 = iprot.readString(); - _val34 = iprot.readI64(); - self.operatorCounters[_key33] = _val34 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.done = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.started = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Operator') - if self.operatorId != None: - oprot.writeFieldBegin('operatorId', TType.STRING, 1) - oprot.writeString(self.operatorId) - oprot.writeFieldEnd() - if self.operatorType != None: - oprot.writeFieldBegin('operatorType', TType.I32, 2) - oprot.writeI32(self.operatorType) - oprot.writeFieldEnd() - if self.operatorAttributes != None: - oprot.writeFieldBegin('operatorAttributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.operatorAttributes)) - for kiter35,viter36 in self.operatorAttributes.items(): - oprot.writeString(kiter35) - oprot.writeString(viter36) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.operatorCounters != None: - oprot.writeFieldBegin('operatorCounters', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.I64, len(self.operatorCounters)) - for kiter37,viter38 in self.operatorCounters.items(): - oprot.writeString(kiter37) - oprot.writeI64(viter38) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.done != None: - oprot.writeFieldBegin('done', TType.BOOL, 5) - oprot.writeBool(self.done) - oprot.writeFieldEnd() - if self.started != None: - oprot.writeFieldBegin('started', TType.BOOL, 6) - oprot.writeBool(self.started) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Task: - """ - Attributes: - - taskId - - taskType - - taskAttributes - - taskCounters - - operatorGraph - - operatorList - - done - - started - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'taskId', None, None, ), # 1 - (2, TType.I32, 'taskType', None, None, ), # 2 - (3, TType.MAP, 'taskAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'taskCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 - (5, TType.STRUCT, 'operatorGraph', (Graph, Graph.thrift_spec), None, ), # 5 - (6, TType.LIST, 'operatorList', (TType.STRUCT,(Operator, Operator.thrift_spec)), None, ), # 6 - (7, TType.BOOL, 'done', None, None, ), # 7 - (8, TType.BOOL, 'started', None, None, ), # 8 - ) - - def __init__(self, taskId=None, taskType=None, taskAttributes=None, taskCounters=None, operatorGraph=None, operatorList=None, done=None, started=None,): - self.taskId = taskId - self.taskType = taskType - self.taskAttributes = taskAttributes - self.taskCounters = taskCounters - self.operatorGraph = operatorGraph - self.operatorList = operatorList - self.done = done - self.started = started - - 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.taskId = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.taskType = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.taskAttributes = {} - (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin() - for _i43 in xrange(_size39): - _key44 = iprot.readString(); - _val45 = iprot.readString(); - self.taskAttributes[_key44] = _val45 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.taskCounters = {} - (_ktype47, _vtype48, _size46 ) = iprot.readMapBegin() - for _i50 in xrange(_size46): - _key51 = iprot.readString(); - _val52 = iprot.readI64(); - self.taskCounters[_key51] = _val52 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.operatorGraph = Graph() - self.operatorGraph.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.LIST: - self.operatorList = [] - (_etype56, _size53) = iprot.readListBegin() - for _i57 in xrange(_size53): - _elem58 = Operator() - _elem58.read(iprot) - self.operatorList.append(_elem58) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.done = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.started = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Task') - if self.taskId != None: - oprot.writeFieldBegin('taskId', TType.STRING, 1) - oprot.writeString(self.taskId) - oprot.writeFieldEnd() - if self.taskType != None: - oprot.writeFieldBegin('taskType', TType.I32, 2) - oprot.writeI32(self.taskType) - oprot.writeFieldEnd() - if self.taskAttributes != None: - oprot.writeFieldBegin('taskAttributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.taskAttributes)) - for kiter59,viter60 in self.taskAttributes.items(): - oprot.writeString(kiter59) - oprot.writeString(viter60) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.taskCounters != None: - oprot.writeFieldBegin('taskCounters', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.I64, len(self.taskCounters)) - for kiter61,viter62 in self.taskCounters.items(): - oprot.writeString(kiter61) - oprot.writeI64(viter62) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.operatorGraph != None: - oprot.writeFieldBegin('operatorGraph', TType.STRUCT, 5) - self.operatorGraph.write(oprot) - oprot.writeFieldEnd() - if self.operatorList != None: - oprot.writeFieldBegin('operatorList', TType.LIST, 6) - oprot.writeListBegin(TType.STRUCT, len(self.operatorList)) - for iter63 in self.operatorList: - iter63.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.done != None: - oprot.writeFieldBegin('done', TType.BOOL, 7) - oprot.writeBool(self.done) - oprot.writeFieldEnd() - if self.started != None: - oprot.writeFieldBegin('started', TType.BOOL, 8) - oprot.writeBool(self.started) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Stage: - """ - Attributes: - - stageId - - stageType - - stageAttributes - - stageCounters - - taskList - - done - - started - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'stageId', None, None, ), # 1 - (2, TType.I32, 'stageType', None, None, ), # 2 - (3, TType.MAP, 'stageAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'stageCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 - (5, TType.LIST, 'taskList', (TType.STRUCT,(Task, Task.thrift_spec)), None, ), # 5 - (6, TType.BOOL, 'done', None, None, ), # 6 - (7, TType.BOOL, 'started', None, None, ), # 7 - ) - - def __init__(self, stageId=None, stageType=None, stageAttributes=None, stageCounters=None, taskList=None, done=None, started=None,): - self.stageId = stageId - self.stageType = stageType - self.stageAttributes = stageAttributes - self.stageCounters = stageCounters - self.taskList = taskList - self.done = done - self.started = started - - 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.stageId = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.stageType = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.stageAttributes = {} - (_ktype65, _vtype66, _size64 ) = iprot.readMapBegin() - for _i68 in xrange(_size64): - _key69 = iprot.readString(); - _val70 = iprot.readString(); - self.stageAttributes[_key69] = _val70 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.stageCounters = {} - (_ktype72, _vtype73, _size71 ) = iprot.readMapBegin() - for _i75 in xrange(_size71): - _key76 = iprot.readString(); - _val77 = iprot.readI64(); - self.stageCounters[_key76] = _val77 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.taskList = [] - (_etype81, _size78) = iprot.readListBegin() - for _i82 in xrange(_size78): - _elem83 = Task() - _elem83.read(iprot) - self.taskList.append(_elem83) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.done = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.started = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Stage') - if self.stageId != None: - oprot.writeFieldBegin('stageId', TType.STRING, 1) - oprot.writeString(self.stageId) - oprot.writeFieldEnd() - if self.stageType != None: - oprot.writeFieldBegin('stageType', TType.I32, 2) - oprot.writeI32(self.stageType) - oprot.writeFieldEnd() - if self.stageAttributes != None: - oprot.writeFieldBegin('stageAttributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stageAttributes)) - for kiter84,viter85 in self.stageAttributes.items(): - oprot.writeString(kiter84) - oprot.writeString(viter85) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.stageCounters != None: - oprot.writeFieldBegin('stageCounters', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.I64, len(self.stageCounters)) - for kiter86,viter87 in self.stageCounters.items(): - oprot.writeString(kiter86) - oprot.writeI64(viter87) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.taskList != None: - oprot.writeFieldBegin('taskList', TType.LIST, 5) - oprot.writeListBegin(TType.STRUCT, len(self.taskList)) - for iter88 in self.taskList: - iter88.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.done != None: - oprot.writeFieldBegin('done', TType.BOOL, 6) - oprot.writeBool(self.done) - oprot.writeFieldEnd() - if self.started != None: - oprot.writeFieldBegin('started', TType.BOOL, 7) - oprot.writeBool(self.started) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Query: - """ - Attributes: - - queryId - - queryType - - queryAttributes - - queryCounters - - stageGraph - - stageList - - done - - started - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'queryId', None, None, ), # 1 - (2, TType.STRING, 'queryType', None, None, ), # 2 - (3, TType.MAP, 'queryAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'queryCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 - (5, TType.STRUCT, 'stageGraph', (Graph, Graph.thrift_spec), None, ), # 5 - (6, TType.LIST, 'stageList', (TType.STRUCT,(Stage, Stage.thrift_spec)), None, ), # 6 - (7, TType.BOOL, 'done', None, None, ), # 7 - (8, TType.BOOL, 'started', None, None, ), # 8 - ) - - def __init__(self, queryId=None, queryType=None, queryAttributes=None, queryCounters=None, stageGraph=None, stageList=None, done=None, started=None,): - self.queryId = queryId - self.queryType = queryType - self.queryAttributes = queryAttributes - self.queryCounters = queryCounters - self.stageGraph = stageGraph - self.stageList = stageList - self.done = done - self.started = started - - 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.queryId = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.queryType = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.queryAttributes = {} - (_ktype90, _vtype91, _size89 ) = iprot.readMapBegin() - for _i93 in xrange(_size89): - _key94 = iprot.readString(); - _val95 = iprot.readString(); - self.queryAttributes[_key94] = _val95 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.queryCounters = {} - (_ktype97, _vtype98, _size96 ) = iprot.readMapBegin() - for _i100 in xrange(_size96): - _key101 = iprot.readString(); - _val102 = iprot.readI64(); - self.queryCounters[_key101] = _val102 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.stageGraph = Graph() - self.stageGraph.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.LIST: - self.stageList = [] - (_etype106, _size103) = iprot.readListBegin() - for _i107 in xrange(_size103): - _elem108 = Stage() - _elem108.read(iprot) - self.stageList.append(_elem108) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.done = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.started = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Query') - if self.queryId != None: - oprot.writeFieldBegin('queryId', TType.STRING, 1) - oprot.writeString(self.queryId) - oprot.writeFieldEnd() - if self.queryType != None: - oprot.writeFieldBegin('queryType', TType.STRING, 2) - oprot.writeString(self.queryType) - oprot.writeFieldEnd() - if self.queryAttributes != None: - oprot.writeFieldBegin('queryAttributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.queryAttributes)) - for kiter109,viter110 in self.queryAttributes.items(): - oprot.writeString(kiter109) - oprot.writeString(viter110) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.queryCounters != None: - oprot.writeFieldBegin('queryCounters', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.I64, len(self.queryCounters)) - for kiter111,viter112 in self.queryCounters.items(): - oprot.writeString(kiter111) - oprot.writeI64(viter112) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.stageGraph != None: - oprot.writeFieldBegin('stageGraph', TType.STRUCT, 5) - self.stageGraph.write(oprot) - oprot.writeFieldEnd() - if self.stageList != None: - oprot.writeFieldBegin('stageList', TType.LIST, 6) - oprot.writeListBegin(TType.STRUCT, len(self.stageList)) - for iter113 in self.stageList: - iter113.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.done != None: - oprot.writeFieldBegin('done', TType.BOOL, 7) - oprot.writeBool(self.done) - oprot.writeFieldEnd() - if self.started != None: - oprot.writeFieldBegin('started', TType.BOOL, 8) - oprot.writeBool(self.started) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class QueryPlan: - """ - Attributes: - - queries - - done - - started - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'queries', (TType.STRUCT,(Query, Query.thrift_spec)), None, ), # 1 - (2, TType.BOOL, 'done', None, None, ), # 2 - (3, TType.BOOL, 'started', None, None, ), # 3 - ) - - def __init__(self, queries=None, done=None, started=None,): - self.queries = queries - self.done = done - self.started = started - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.queries = [] - (_etype117, _size114) = iprot.readListBegin() - for _i118 in xrange(_size114): - _elem119 = Query() - _elem119.read(iprot) - self.queries.append(_elem119) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.done = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.started = iprot.readBool(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('QueryPlan') - if self.queries != None: - oprot.writeFieldBegin('queries', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.queries)) - for iter120 in self.queries: - iter120.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.done != None: - oprot.writeFieldBegin('done', TType.BOOL, 2) - oprot.writeBool(self.done) - oprot.writeFieldEnd() - if self.started != None: - oprot.writeFieldBegin('started', TType.BOOL, 3) - oprot.writeBool(self.started) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - diff --git ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp new file mode 100644 index 0000000..5bd3cc4 --- /dev/null +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp @@ -0,0 +1,16 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "queryplan_constants.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +const queryplanConstants g_queryplan_constants; + +queryplanConstants::queryplanConstants() { +} + +}}} // namespace + diff --git ql/src/gen/thrift/gen-cpp/queryplan_constants.h ql/src/gen/thrift/gen-cpp/queryplan_constants.h new file mode 100644 index 0000000..871b474 --- /dev/null +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.h @@ -0,0 +1,23 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef queryplan_CONSTANTS_H +#define queryplan_CONSTANTS_H + +#include "queryplan_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +class queryplanConstants { + public: + queryplanConstants(); + +}; + +extern const queryplanConstants g_queryplan_constants; + +}}} // namespace + +#endif diff --git ql/src/gen/thrift/gen-cpp/queryplan_types.cpp ql/src/gen/thrift/gen-cpp/queryplan_types.cpp new file mode 100644 index 0000000..65651af --- /dev/null +++ ql/src/gen/thrift/gen-cpp/queryplan_types.cpp @@ -0,0 +1,1075 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "queryplan_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +const char* Adjacency::ascii_fingerprint = "BC4F8C394677A1003AA9F56ED26D8204"; +const uint8_t Adjacency::binary_fingerprint[16] = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; + +uint32_t Adjacency::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->node); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->children.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + iprot->readListBegin(_etype3, _size0); + this->children.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += iprot->readString(this->children[_i4]); + } + iprot->readListEnd(); + } + this->__isset.children = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast5; + xfer += iprot->readI32(ecast5); + this->adjacencyType = (AdjacencyType::type)ecast5; + this->__isset.adjacencyType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Adjacency::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Adjacency"); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->node); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("children", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->children.size()); + std::vector ::const_iterator _iter6; + for (_iter6 = this->children.begin(); _iter6 != this->children.end(); ++_iter6) + { + xfer += oprot->writeString((*_iter6)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyType", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->adjacencyType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Graph::ascii_fingerprint = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; +const uint8_t Graph::binary_fingerprint[16] = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; + +uint32_t Graph::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast7; + xfer += iprot->readI32(ecast7); + this->nodeType = (NodeType::type)ecast7; + this->__isset.nodeType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->roots.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + iprot->readListBegin(_etype11, _size8); + this->roots.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) + { + xfer += iprot->readString(this->roots[_i12]); + } + iprot->readListEnd(); + } + this->__isset.roots = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->adjacencyList.clear(); + uint32_t _size13; + ::apache::thrift::protocol::TType _etype16; + iprot->readListBegin(_etype16, _size13); + this->adjacencyList.resize(_size13); + uint32_t _i17; + for (_i17 = 0; _i17 < _size13; ++_i17) + { + xfer += this->adjacencyList[_i17].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.adjacencyList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Graph::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Graph"); + xfer += oprot->writeFieldBegin("nodeType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->nodeType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("roots", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->roots.size()); + std::vector ::const_iterator _iter18; + for (_iter18 = this->roots.begin(); _iter18 != this->roots.end(); ++_iter18) + { + xfer += oprot->writeString((*_iter18)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyList", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->adjacencyList.size()); + std::vector ::const_iterator _iter19; + for (_iter19 = this->adjacencyList.begin(); _iter19 != this->adjacencyList.end(); ++_iter19) + { + xfer += (*_iter19).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Operator::ascii_fingerprint = "30917C758A752485AF223B697479DE6C"; +const uint8_t Operator::binary_fingerprint[16] = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; + +uint32_t Operator::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->operatorId); + this->__isset.operatorId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast20; + xfer += iprot->readI32(ecast20); + this->operatorType = (OperatorType::type)ecast20; + this->__isset.operatorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->operatorAttributes.clear(); + uint32_t _size21; + ::apache::thrift::protocol::TType _ktype22; + ::apache::thrift::protocol::TType _vtype23; + iprot->readMapBegin(_ktype22, _vtype23, _size21); + uint32_t _i25; + for (_i25 = 0; _i25 < _size21; ++_i25) + { + std::string _key26; + xfer += iprot->readString(_key26); + std::string& _val27 = this->operatorAttributes[_key26]; + xfer += iprot->readString(_val27); + } + iprot->readMapEnd(); + } + this->__isset.operatorAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->operatorCounters.clear(); + uint32_t _size28; + ::apache::thrift::protocol::TType _ktype29; + ::apache::thrift::protocol::TType _vtype30; + iprot->readMapBegin(_ktype29, _vtype30, _size28); + uint32_t _i32; + for (_i32 = 0; _i32 < _size28; ++_i32) + { + std::string _key33; + xfer += iprot->readString(_key33); + int64_t& _val34 = this->operatorCounters[_key33]; + xfer += iprot->readI64(_val34); + } + iprot->readMapEnd(); + } + this->__isset.operatorCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Operator::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Operator"); + xfer += oprot->writeFieldBegin("operatorId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->operatorId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->operatorType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->operatorAttributes.size()); + std::map ::const_iterator _iter35; + for (_iter35 = this->operatorAttributes.begin(); _iter35 != this->operatorAttributes.end(); ++_iter35) + { + xfer += oprot->writeString(_iter35->first); + xfer += oprot->writeString(_iter35->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->operatorCounters.size()); + std::map ::const_iterator _iter36; + for (_iter36 = this->operatorCounters.begin(); _iter36 != this->operatorCounters.end(); ++_iter36) + { + xfer += oprot->writeString(_iter36->first); + xfer += oprot->writeI64(_iter36->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Task::ascii_fingerprint = "AC741A136EFA51843AFC3A12F6A793D1"; +const uint8_t Task::binary_fingerprint[16] = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; + +uint32_t Task::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->taskId); + this->__isset.taskId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast37; + xfer += iprot->readI32(ecast37); + this->taskType = (TaskType::type)ecast37; + this->__isset.taskType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->taskAttributes.clear(); + uint32_t _size38; + ::apache::thrift::protocol::TType _ktype39; + ::apache::thrift::protocol::TType _vtype40; + iprot->readMapBegin(_ktype39, _vtype40, _size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) + { + std::string _key43; + xfer += iprot->readString(_key43); + std::string& _val44 = this->taskAttributes[_key43]; + xfer += iprot->readString(_val44); + } + iprot->readMapEnd(); + } + this->__isset.taskAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->taskCounters.clear(); + uint32_t _size45; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; + iprot->readMapBegin(_ktype46, _vtype47, _size45); + uint32_t _i49; + for (_i49 = 0; _i49 < _size45; ++_i49) + { + std::string _key50; + xfer += iprot->readString(_key50); + int64_t& _val51 = this->taskCounters[_key50]; + xfer += iprot->readI64(_val51); + } + iprot->readMapEnd(); + } + this->__isset.taskCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->operatorGraph.read(iprot); + this->__isset.operatorGraph = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->operatorList.clear(); + uint32_t _size52; + ::apache::thrift::protocol::TType _etype55; + iprot->readListBegin(_etype55, _size52); + this->operatorList.resize(_size52); + uint32_t _i56; + for (_i56 = 0; _i56 < _size52; ++_i56) + { + xfer += this->operatorList[_i56].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.operatorList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Task::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Task"); + xfer += oprot->writeFieldBegin("taskId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->taskId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->taskType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->taskAttributes.size()); + std::map ::const_iterator _iter57; + for (_iter57 = this->taskAttributes.begin(); _iter57 != this->taskAttributes.end(); ++_iter57) + { + xfer += oprot->writeString(_iter57->first); + xfer += oprot->writeString(_iter57->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->taskCounters.size()); + std::map ::const_iterator _iter58; + for (_iter58 = this->taskCounters.begin(); _iter58 != this->taskCounters.end(); ++_iter58) + { + xfer += oprot->writeString(_iter58->first); + xfer += oprot->writeI64(_iter58->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + if (this->__isset.operatorGraph) { + xfer += oprot->writeFieldBegin("operatorGraph", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->operatorGraph.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.operatorList) { + xfer += oprot->writeFieldBegin("operatorList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->operatorList.size()); + std::vector ::const_iterator _iter59; + for (_iter59 = this->operatorList.begin(); _iter59 != this->operatorList.end(); ++_iter59) + { + xfer += (*_iter59).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Stage::ascii_fingerprint = "86EA3C7B0690AFED21A3D479E2B32378"; +const uint8_t Stage::binary_fingerprint[16] = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; + +uint32_t Stage::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->stageId); + this->__isset.stageId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast60; + xfer += iprot->readI32(ecast60); + this->stageType = (StageType::type)ecast60; + this->__isset.stageType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->stageAttributes.clear(); + uint32_t _size61; + ::apache::thrift::protocol::TType _ktype62; + ::apache::thrift::protocol::TType _vtype63; + iprot->readMapBegin(_ktype62, _vtype63, _size61); + uint32_t _i65; + for (_i65 = 0; _i65 < _size61; ++_i65) + { + std::string _key66; + xfer += iprot->readString(_key66); + std::string& _val67 = this->stageAttributes[_key66]; + xfer += iprot->readString(_val67); + } + iprot->readMapEnd(); + } + this->__isset.stageAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->stageCounters.clear(); + uint32_t _size68; + ::apache::thrift::protocol::TType _ktype69; + ::apache::thrift::protocol::TType _vtype70; + iprot->readMapBegin(_ktype69, _vtype70, _size68); + uint32_t _i72; + for (_i72 = 0; _i72 < _size68; ++_i72) + { + std::string _key73; + xfer += iprot->readString(_key73); + int64_t& _val74 = this->stageCounters[_key73]; + xfer += iprot->readI64(_val74); + } + iprot->readMapEnd(); + } + this->__isset.stageCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->taskList.clear(); + uint32_t _size75; + ::apache::thrift::protocol::TType _etype78; + iprot->readListBegin(_etype78, _size75); + this->taskList.resize(_size75); + uint32_t _i79; + for (_i79 = 0; _i79 < _size75; ++_i79) + { + xfer += this->taskList[_i79].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.taskList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Stage::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Stage"); + xfer += oprot->writeFieldBegin("stageId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->stageId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->stageType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->stageAttributes.size()); + std::map ::const_iterator _iter80; + for (_iter80 = this->stageAttributes.begin(); _iter80 != this->stageAttributes.end(); ++_iter80) + { + xfer += oprot->writeString(_iter80->first); + xfer += oprot->writeString(_iter80->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->stageCounters.size()); + std::map ::const_iterator _iter81; + for (_iter81 = this->stageCounters.begin(); _iter81 != this->stageCounters.end(); ++_iter81) + { + xfer += oprot->writeString(_iter81->first); + xfer += oprot->writeI64(_iter81->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskList", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->taskList.size()); + std::vector ::const_iterator _iter82; + for (_iter82 = this->taskList.begin(); _iter82 != this->taskList.end(); ++_iter82) + { + xfer += (*_iter82).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Query::ascii_fingerprint = "68300D63A5D40F2D17B9A9440FF626C1"; +const uint8_t Query::binary_fingerprint[16] = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; + +uint32_t Query::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->queryId); + this->__isset.queryId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->queryType); + this->__isset.queryType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->queryAttributes.clear(); + uint32_t _size83; + ::apache::thrift::protocol::TType _ktype84; + ::apache::thrift::protocol::TType _vtype85; + iprot->readMapBegin(_ktype84, _vtype85, _size83); + uint32_t _i87; + for (_i87 = 0; _i87 < _size83; ++_i87) + { + std::string _key88; + xfer += iprot->readString(_key88); + std::string& _val89 = this->queryAttributes[_key88]; + xfer += iprot->readString(_val89); + } + iprot->readMapEnd(); + } + this->__isset.queryAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->queryCounters.clear(); + uint32_t _size90; + ::apache::thrift::protocol::TType _ktype91; + ::apache::thrift::protocol::TType _vtype92; + iprot->readMapBegin(_ktype91, _vtype92, _size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) + { + std::string _key95; + xfer += iprot->readString(_key95); + int64_t& _val96 = this->queryCounters[_key95]; + xfer += iprot->readI64(_val96); + } + iprot->readMapEnd(); + } + this->__isset.queryCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stageGraph.read(iprot); + this->__isset.stageGraph = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->stageList.clear(); + uint32_t _size97; + ::apache::thrift::protocol::TType _etype100; + iprot->readListBegin(_etype100, _size97); + this->stageList.resize(_size97); + uint32_t _i101; + for (_i101 = 0; _i101 < _size97; ++_i101) + { + xfer += this->stageList[_i101].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.stageList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Query::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Query"); + xfer += oprot->writeFieldBegin("queryId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->queryId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryType", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->queryType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->queryAttributes.size()); + std::map ::const_iterator _iter102; + for (_iter102 = this->queryAttributes.begin(); _iter102 != this->queryAttributes.end(); ++_iter102) + { + xfer += oprot->writeString(_iter102->first); + xfer += oprot->writeString(_iter102->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->queryCounters.size()); + std::map ::const_iterator _iter103; + for (_iter103 = this->queryCounters.begin(); _iter103 != this->queryCounters.end(); ++_iter103) + { + xfer += oprot->writeString(_iter103->first); + xfer += oprot->writeI64(_iter103->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageGraph", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->stageGraph.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->stageList.size()); + std::vector ::const_iterator _iter104; + for (_iter104 = this->stageList.begin(); _iter104 != this->stageList.end(); ++_iter104) + { + xfer += (*_iter104).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* QueryPlan::ascii_fingerprint = "3418D1B0C20C288C8406186700B772E3"; +const uint8_t QueryPlan::binary_fingerprint[16] = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; + +uint32_t QueryPlan::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->queries.clear(); + uint32_t _size105; + ::apache::thrift::protocol::TType _etype108; + iprot->readListBegin(_etype108, _size105); + this->queries.resize(_size105); + uint32_t _i109; + for (_i109 = 0; _i109 < _size105; ++_i109) + { + xfer += this->queries[_i109].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.queries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t QueryPlan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("QueryPlan"); + xfer += oprot->writeFieldBegin("queries", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->queries.size()); + std::vector ::const_iterator _iter110; + for (_iter110 = this->queries.begin(); _iter110 != this->queries.end(); ++_iter110) + { + xfer += (*_iter110).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +}}} // namespace diff --git ql/src/gen/thrift/gen-cpp/queryplan_types.h ql/src/gen/thrift/gen-cpp/queryplan_types.h new file mode 100644 index 0000000..4d68815 --- /dev/null +++ ql/src/gen/thrift/gen-cpp/queryplan_types.h @@ -0,0 +1,467 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef queryplan_TYPES_H +#define queryplan_TYPES_H + +#include +#include +#include +#include + + + +namespace Apache { namespace Hadoop { namespace Hive { + +struct AdjacencyType { + enum type { + CONJUNCTIVE = 0, + DISJUNCTIVE = 1 + }; +}; + +struct NodeType { + enum type { + OPERATOR = 0, + STAGE = 1 + }; +}; + +struct OperatorType { + enum type { + JOIN = 0, + MAPJOIN = 1, + EXTRACT = 2, + FILTER = 3, + FORWARD = 4, + GROUPBY = 5, + LIMIT = 6, + SCRIPT = 7, + SELECT = 8, + TABLESCAN = 9, + FILESINK = 10, + REDUCESINK = 11, + UNION = 12, + UDTF = 13, + LATERALVIEWJOIN = 14, + LATERALVIEWFORWARD = 15, + HASHTABLESINK = 16, + HASHTABLEDUMMY = 17 + }; +}; + +struct TaskType { + enum type { + MAP = 0, + REDUCE = 1, + OTHER = 2 + }; +}; + +struct StageType { + enum type { + CONDITIONAL = 0, + COPY = 1, + DDL = 2, + MAPRED = 3, + EXPLAIN = 4, + FETCH = 5, + FUNC = 6, + MAPREDLOCAL = 7, + MOVE = 8, + STATS = 9 + }; +}; + +typedef struct _Adjacency__isset { + _Adjacency__isset() : node(false), children(false), adjacencyType(false) {} + bool node; + bool children; + bool adjacencyType; +} _Adjacency__isset; + +class Adjacency { + public: + + static const char* ascii_fingerprint; // = "BC4F8C394677A1003AA9F56ED26D8204"; + static const uint8_t binary_fingerprint[16]; // = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; + + Adjacency() : node("") { + } + + virtual ~Adjacency() throw() {} + + std::string node; + std::vector children; + AdjacencyType::type adjacencyType; + + _Adjacency__isset __isset; + + bool operator == (const Adjacency & rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(children == rhs.children)) + return false; + if (!(adjacencyType == rhs.adjacencyType)) + return false; + return true; + } + bool operator != (const Adjacency &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Adjacency & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Graph__isset { + _Graph__isset() : nodeType(false), roots(false), adjacencyList(false) {} + bool nodeType; + bool roots; + bool adjacencyList; +} _Graph__isset; + +class Graph { + public: + + static const char* ascii_fingerprint; // = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; + static const uint8_t binary_fingerprint[16]; // = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; + + Graph() { + } + + virtual ~Graph() throw() {} + + NodeType::type nodeType; + std::vector roots; + std::vector adjacencyList; + + _Graph__isset __isset; + + bool operator == (const Graph & rhs) const + { + if (!(nodeType == rhs.nodeType)) + return false; + if (!(roots == rhs.roots)) + return false; + if (!(adjacencyList == rhs.adjacencyList)) + return false; + return true; + } + bool operator != (const Graph &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Graph & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Operator__isset { + _Operator__isset() : operatorId(false), operatorType(false), operatorAttributes(false), operatorCounters(false), done(false), started(false) {} + bool operatorId; + bool operatorType; + bool operatorAttributes; + bool operatorCounters; + bool done; + bool started; +} _Operator__isset; + +class Operator { + public: + + static const char* ascii_fingerprint; // = "30917C758A752485AF223B697479DE6C"; + static const uint8_t binary_fingerprint[16]; // = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; + + Operator() : operatorId(""), done(0), started(0) { + } + + virtual ~Operator() throw() {} + + std::string operatorId; + OperatorType::type operatorType; + std::map operatorAttributes; + std::map operatorCounters; + bool done; + bool started; + + _Operator__isset __isset; + + bool operator == (const Operator & rhs) const + { + if (!(operatorId == rhs.operatorId)) + return false; + if (!(operatorType == rhs.operatorType)) + return false; + if (!(operatorAttributes == rhs.operatorAttributes)) + return false; + if (!(operatorCounters == rhs.operatorCounters)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Operator &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Operator & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Task__isset { + _Task__isset() : taskId(false), taskType(false), taskAttributes(false), taskCounters(false), operatorGraph(false), operatorList(false), done(false), started(false) {} + bool taskId; + bool taskType; + bool taskAttributes; + bool taskCounters; + bool operatorGraph; + bool operatorList; + bool done; + bool started; +} _Task__isset; + +class Task { + public: + + static const char* ascii_fingerprint; // = "AC741A136EFA51843AFC3A12F6A793D1"; + static const uint8_t binary_fingerprint[16]; // = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; + + Task() : taskId(""), done(0), started(0) { + } + + virtual ~Task() throw() {} + + std::string taskId; + TaskType::type taskType; + std::map taskAttributes; + std::map taskCounters; + Graph operatorGraph; + std::vector operatorList; + bool done; + bool started; + + _Task__isset __isset; + + bool operator == (const Task & rhs) const + { + if (!(taskId == rhs.taskId)) + return false; + if (!(taskType == rhs.taskType)) + return false; + if (!(taskAttributes == rhs.taskAttributes)) + return false; + if (!(taskCounters == rhs.taskCounters)) + return false; + if (__isset.operatorGraph != rhs.__isset.operatorGraph) + return false; + else if (__isset.operatorGraph && !(operatorGraph == rhs.operatorGraph)) + return false; + if (__isset.operatorList != rhs.__isset.operatorList) + return false; + else if (__isset.operatorList && !(operatorList == rhs.operatorList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Task &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Task & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Stage__isset { + _Stage__isset() : stageId(false), stageType(false), stageAttributes(false), stageCounters(false), taskList(false), done(false), started(false) {} + bool stageId; + bool stageType; + bool stageAttributes; + bool stageCounters; + bool taskList; + bool done; + bool started; +} _Stage__isset; + +class Stage { + public: + + static const char* ascii_fingerprint; // = "86EA3C7B0690AFED21A3D479E2B32378"; + static const uint8_t binary_fingerprint[16]; // = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; + + Stage() : stageId(""), done(0), started(0) { + } + + virtual ~Stage() throw() {} + + std::string stageId; + StageType::type stageType; + std::map stageAttributes; + std::map stageCounters; + std::vector taskList; + bool done; + bool started; + + _Stage__isset __isset; + + bool operator == (const Stage & rhs) const + { + if (!(stageId == rhs.stageId)) + return false; + if (!(stageType == rhs.stageType)) + return false; + if (!(stageAttributes == rhs.stageAttributes)) + return false; + if (!(stageCounters == rhs.stageCounters)) + return false; + if (!(taskList == rhs.taskList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Stage &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Stage & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Query__isset { + _Query__isset() : queryId(false), queryType(false), queryAttributes(false), queryCounters(false), stageGraph(false), stageList(false), done(false), started(false) {} + bool queryId; + bool queryType; + bool queryAttributes; + bool queryCounters; + bool stageGraph; + bool stageList; + bool done; + bool started; +} _Query__isset; + +class Query { + public: + + static const char* ascii_fingerprint; // = "68300D63A5D40F2D17B9A9440FF626C1"; + static const uint8_t binary_fingerprint[16]; // = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; + + Query() : queryId(""), queryType(""), done(0), started(0) { + } + + virtual ~Query() throw() {} + + std::string queryId; + std::string queryType; + std::map queryAttributes; + std::map queryCounters; + Graph stageGraph; + std::vector stageList; + bool done; + bool started; + + _Query__isset __isset; + + bool operator == (const Query & rhs) const + { + if (!(queryId == rhs.queryId)) + return false; + if (!(queryType == rhs.queryType)) + return false; + if (!(queryAttributes == rhs.queryAttributes)) + return false; + if (!(queryCounters == rhs.queryCounters)) + return false; + if (!(stageGraph == rhs.stageGraph)) + return false; + if (!(stageList == rhs.stageList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Query &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Query & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _QueryPlan__isset { + _QueryPlan__isset() : queries(false), done(false), started(false) {} + bool queries; + bool done; + bool started; +} _QueryPlan__isset; + +class QueryPlan { + public: + + static const char* ascii_fingerprint; // = "3418D1B0C20C288C8406186700B772E3"; + static const uint8_t binary_fingerprint[16]; // = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; + + QueryPlan() : done(0), started(0) { + } + + virtual ~QueryPlan() throw() {} + + std::vector queries; + bool done; + bool started; + + _QueryPlan__isset __isset; + + bool operator == (const QueryPlan & rhs) const + { + if (!(queries == rhs.queries)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const QueryPlan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const QueryPlan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +}}} // namespace + +#endif diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java new file mode 100644 index 0000000..8728260 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java @@ -0,0 +1,531 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private List children; + 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; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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))); + tmpMap.put(_Fields.CHILDREN, new FieldMetaData("children", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + 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); + } + + public Adjacency() { + } + + public Adjacency( + String node, + List children, + AdjacencyType adjacencyType) + { + this(); + this.node = node; + this.children = children; + this.adjacencyType = adjacencyType; + } + + /** + * Performs a deep copy on other. + */ + public Adjacency(Adjacency other) { + if (other.isSetNode()) { + this.node = other.node; + } + if (other.isSetChildren()) { + List __this__children = new ArrayList(); + for (String other_element : other.children) { + __this__children.add(other_element); + } + this.children = __this__children; + } + if (other.isSetAdjacencyType()) { + this.adjacencyType = other.adjacencyType; + } + } + + public Adjacency deepCopy() { + return new Adjacency(this); + } + + @Override + public void clear() { + this.node = null; + this.children = null; + this.adjacencyType = null; + } + + public String getNode() { + return this.node; + } + + public void setNode(String node) { + this.node = node; + } + + public void unsetNode() { + this.node = null; + } + + /** 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(); + } + + public java.util.Iterator getChildrenIterator() { + return (this.children == null) ? null : this.children.iterator(); + } + + public void addToChildren(String elem) { + if (this.children == null) { + this.children = new ArrayList(); + } + this.children.add(elem); + } + + public List getChildren() { + return this.children; + } + + public void setChildren(List children) { + this.children = children; + } + + public void unsetChildren() { + this.children = null; + } + + /** Returns true if field children is set (has been asigned a value) and false otherwise */ + public boolean isSetChildren() { + return this.children != null; + } + + public void setChildrenIsSet(boolean value) { + if (!value) { + this.children = null; + } + } + + /** + * + * @see AdjacencyType + */ + public AdjacencyType getAdjacencyType() { + return this.adjacencyType; + } + + /** + * + * @see AdjacencyType + */ + public void setAdjacencyType(AdjacencyType adjacencyType) { + this.adjacencyType = adjacencyType; + } + + public void unsetAdjacencyType() { + this.adjacencyType = null; + } + + /** Returns true if field adjacencyType is set (has been asigned a value) and false otherwise */ + public boolean isSetAdjacencyType() { + return this.adjacencyType != null; + } + + 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(); + } else { + setNode((String)value); + } + break; + + case CHILDREN: + if (value == null) { + unsetChildren(); + } else { + setChildren((List)value); + } + break; + + case ADJACENCY_TYPE: + if (value == null) { + unsetAdjacencyType(); + } else { + setAdjacencyType((AdjacencyType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NODE: + return getNode(); + + case CHILDREN: + return getChildren(); + + case ADJACENCY_TYPE: + return getAdjacencyType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NODE: + return isSetNode(); + case CHILDREN: + return isSetChildren(); + case ADJACENCY_TYPE: + return isSetAdjacencyType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Adjacency) + return this.equals((Adjacency)that); + return false; + } + + public boolean equals(Adjacency that) { + if (that == null) + return false; + + boolean this_present_node = true && this.isSetNode(); + boolean that_present_node = true && that.isSetNode(); + if (this_present_node || that_present_node) { + if (!(this_present_node && that_present_node)) + return false; + if (!this.node.equals(that.node)) + return false; + } + + boolean this_present_children = true && this.isSetChildren(); + boolean that_present_children = true && that.isSetChildren(); + if (this_present_children || that_present_children) { + if (!(this_present_children && that_present_children)) + return false; + if (!this.children.equals(that.children)) + return false; + } + + 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.equals(that.adjacencyType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Adjacency other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Adjacency typedOther = (Adjacency)other; + + lastComparison = Boolean.valueOf(isSetNode()).compareTo(typedOther.isSetNode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNode()) { + lastComparison = TBaseHelper.compareTo(this.node, typedOther.node); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetChildren()).compareTo(typedOther.isSetChildren()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetChildren()) { + lastComparison = TBaseHelper.compareTo(this.children, typedOther.children); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAdjacencyType()).compareTo(typedOther.isSetAdjacencyType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAdjacencyType()) { + lastComparison = TBaseHelper.compareTo(this.adjacencyType, typedOther.adjacencyType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NODE + if (field.type == TType.STRING) { + this.node = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // CHILDREN + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.children = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; + _elem2 = iprot.readString(); + this.children.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ADJACENCY_TYPE + if (field.type == TType.I32) { + this.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.node != null) { + oprot.writeFieldBegin(NODE_FIELD_DESC); + oprot.writeString(this.node); + oprot.writeFieldEnd(); + } + if (this.children != null) { + oprot.writeFieldBegin(CHILDREN_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.children.size())); + for (String _iter3 : this.children) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.adjacencyType != null) { + oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); + oprot.writeI32(this.adjacencyType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Adjacency("); + boolean first = true; + + sb.append("node:"); + if (this.node == null) { + sb.append("null"); + } else { + sb.append(this.node); + } + first = false; + if (!first) sb.append(", "); + sb.append("children:"); + if (this.children == null) { + sb.append("null"); + } else { + sb.append(this.children); + } + first = false; + if (!first) sb.append(", "); + sb.append("adjacencyType:"); + if (this.adjacencyType == null) { + sb.append("null"); + } else { + sb.append(this.adjacencyType); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java new file mode 100644 index 0000000..cfbd3e4 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java @@ -0,0 +1,44 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum AdjacencyType implements TEnum { + CONJUNCTIVE(0), + DISJUNCTIVE(1); + + private final int value; + + 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/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java new file mode 100644 index 0000000..028addf --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java @@ -0,0 +1,569 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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 NodeType nodeType; + private List roots; + private List adjacencyList; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.ADJACENCY_LIST, new FieldMetaData("adjacencyList", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Adjacency.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap); + } + + public Graph() { + } + + public Graph( + NodeType nodeType, + List roots, + List adjacencyList) + { + this(); + this.nodeType = nodeType; + this.roots = roots; + this.adjacencyList = adjacencyList; + } + + /** + * Performs a deep copy on other. + */ + public Graph(Graph other) { + if (other.isSetNodeType()) { + this.nodeType = other.nodeType; + } + if (other.isSetRoots()) { + List __this__roots = new ArrayList(); + for (String other_element : other.roots) { + __this__roots.add(other_element); + } + this.roots = __this__roots; + } + if (other.isSetAdjacencyList()) { + List __this__adjacencyList = new ArrayList(); + for (Adjacency other_element : other.adjacencyList) { + __this__adjacencyList.add(new Adjacency(other_element)); + } + this.adjacencyList = __this__adjacencyList; + } + } + + public Graph deepCopy() { + return new Graph(this); + } + + @Override + public void clear() { + this.nodeType = null; + this.roots = null; + this.adjacencyList = null; + } + + /** + * + * @see NodeType + */ + public NodeType getNodeType() { + return this.nodeType; + } + + /** + * + * @see NodeType + */ + public void setNodeType(NodeType nodeType) { + this.nodeType = nodeType; + } + + public void unsetNodeType() { + this.nodeType = null; + } + + /** Returns true if field nodeType is set (has been asigned a value) and false otherwise */ + public boolean isSetNodeType() { + return this.nodeType != null; + } + + public void setNodeTypeIsSet(boolean value) { + if (!value) { + this.nodeType = null; + } + } + + public int getRootsSize() { + return (this.roots == null) ? 0 : this.roots.size(); + } + + public java.util.Iterator getRootsIterator() { + return (this.roots == null) ? null : this.roots.iterator(); + } + + public void addToRoots(String elem) { + if (this.roots == null) { + this.roots = new ArrayList(); + } + this.roots.add(elem); + } + + public List getRoots() { + return this.roots; + } + + public void setRoots(List roots) { + this.roots = roots; + } + + public void unsetRoots() { + this.roots = null; + } + + /** 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(); + } + + public java.util.Iterator getAdjacencyListIterator() { + return (this.adjacencyList == null) ? null : this.adjacencyList.iterator(); + } + + public void addToAdjacencyList(Adjacency elem) { + if (this.adjacencyList == null) { + this.adjacencyList = new ArrayList(); + } + this.adjacencyList.add(elem); + } + + public List getAdjacencyList() { + return this.adjacencyList; + } + + public void setAdjacencyList(List adjacencyList) { + this.adjacencyList = adjacencyList; + } + + public void unsetAdjacencyList() { + this.adjacencyList = null; + } + + /** Returns true if field adjacencyList is set (has been asigned a value) and false otherwise */ + public boolean isSetAdjacencyList() { + return this.adjacencyList != null; + } + + 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((NodeType)value); + } + break; + + case ROOTS: + if (value == null) { + unsetRoots(); + } else { + setRoots((List)value); + } + break; + + case ADJACENCY_LIST: + if (value == null) { + unsetAdjacencyList(); + } else { + setAdjacencyList((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NODE_TYPE: + return getNodeType(); + + case ROOTS: + return getRoots(); + + case ADJACENCY_LIST: + return getAdjacencyList(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NODE_TYPE: + return isSetNodeType(); + case ROOTS: + return isSetRoots(); + case ADJACENCY_LIST: + return isSetAdjacencyList(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Graph) + return this.equals((Graph)that); + return false; + } + + public boolean equals(Graph that) { + if (that == null) + return false; + + 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.equals(that.nodeType)) + return false; + } + + boolean this_present_roots = true && this.isSetRoots(); + boolean that_present_roots = true && that.isSetRoots(); + if (this_present_roots || that_present_roots) { + if (!(this_present_roots && that_present_roots)) + return false; + if (!this.roots.equals(that.roots)) + return false; + } + + boolean this_present_adjacencyList = true && this.isSetAdjacencyList(); + boolean that_present_adjacencyList = true && that.isSetAdjacencyList(); + if (this_present_adjacencyList || that_present_adjacencyList) { + if (!(this_present_adjacencyList && that_present_adjacencyList)) + return false; + if (!this.adjacencyList.equals(that.adjacencyList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Graph other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Graph typedOther = (Graph)other; + + lastComparison = Boolean.valueOf(isSetNodeType()).compareTo(typedOther.isSetNodeType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNodeType()) { + lastComparison = TBaseHelper.compareTo(this.nodeType, typedOther.nodeType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRoots()).compareTo(typedOther.isSetRoots()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoots()) { + lastComparison = TBaseHelper.compareTo(this.roots, typedOther.roots); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAdjacencyList()).compareTo(typedOther.isSetAdjacencyList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAdjacencyList()) { + lastComparison = TBaseHelper.compareTo(this.adjacencyList, typedOther.adjacencyList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NODE_TYPE + if (field.type == TType.I32) { + this.nodeType = NodeType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROOTS + if (field.type == TType.LIST) { + { + TList _list4 = iprot.readListBegin(); + this.roots = new ArrayList(_list4.size); + for (int _i5 = 0; _i5 < _list4.size; ++_i5) + { + String _elem6; + _elem6 = iprot.readString(); + this.roots.add(_elem6); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ADJACENCY_LIST + if (field.type == TType.LIST) { + { + TList _list7 = iprot.readListBegin(); + this.adjacencyList = new ArrayList(_list7.size); + for (int _i8 = 0; _i8 < _list7.size; ++_i8) + { + Adjacency _elem9; + _elem9 = new Adjacency(); + _elem9.read(iprot); + this.adjacencyList.add(_elem9); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + 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) + { + oprot.writeString(_iter10); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.adjacencyList != null) { + oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.adjacencyList.size())); + for (Adjacency _iter11 : this.adjacencyList) + { + _iter11.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Graph("); + boolean first = true; + + sb.append("nodeType:"); + if (this.nodeType == null) { + sb.append("null"); + } else { + sb.append(this.nodeType); + } + first = false; + if (!first) sb.append(", "); + sb.append("roots:"); + if (this.roots == null) { + sb.append("null"); + } else { + sb.append(this.roots); + } + first = false; + if (!first) sb.append(", "); + sb.append("adjacencyList:"); + if (this.adjacencyList == null) { + sb.append("null"); + } else { + sb.append(this.adjacencyList); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java new file mode 100644 index 0000000..6174d6e --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java @@ -0,0 +1,44 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum NodeType implements TEnum { + OPERATOR(0), + STAGE(1); + + private final int value; + + 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/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java new file mode 100644 index 0000000..1229724 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java @@ -0,0 +1,841 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField OPERATOR_COUNTERS_FIELD_DESC = new TField("operatorCounters", TType.MAP, (short)4); + private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)5); + private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)6); + + private String operatorId; + private OperatorType operatorType; + private Map operatorAttributes; + private Map operatorCounters; + private boolean done; + private boolean started; + + /** 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; + } + } + + // 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))); + 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)))); + tmpMap.put(_Fields.OPERATOR_COUNTERS, new FieldMetaData("operatorCounters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.I64)))); + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Operator.class, metaDataMap); + } + + public Operator() { + } + + public Operator( + String operatorId, + OperatorType operatorType, + Map operatorAttributes, + Map operatorCounters, + boolean done, + boolean started) + { + this(); + this.operatorId = operatorId; + this.operatorType = operatorType; + this.operatorAttributes = operatorAttributes; + this.operatorCounters = operatorCounters; + this.done = done; + setDoneIsSet(true); + this.started = started; + 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; + } + if (other.isSetOperatorType()) { + this.operatorType = other.operatorType; + } + if (other.isSetOperatorAttributes()) { + Map __this__operatorAttributes = new HashMap(); + for (Map.Entry other_element : other.operatorAttributes.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__operatorAttributes_copy_key = other_element_key; + + String __this__operatorAttributes_copy_value = other_element_value; + + __this__operatorAttributes.put(__this__operatorAttributes_copy_key, __this__operatorAttributes_copy_value); + } + this.operatorAttributes = __this__operatorAttributes; + } + if (other.isSetOperatorCounters()) { + Map __this__operatorCounters = new HashMap(); + for (Map.Entry other_element : other.operatorCounters.entrySet()) { + + String other_element_key = other_element.getKey(); + Long other_element_value = other_element.getValue(); + + String __this__operatorCounters_copy_key = other_element_key; + + Long __this__operatorCounters_copy_value = other_element_value; + + __this__operatorCounters.put(__this__operatorCounters_copy_key, __this__operatorCounters_copy_value); + } + this.operatorCounters = __this__operatorCounters; + } + this.done = other.done; + this.started = other.started; + } + + public Operator deepCopy() { + return new Operator(this); + } + + @Override + public void clear() { + this.operatorId = null; + this.operatorType = null; + this.operatorAttributes = null; + this.operatorCounters = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + + public String getOperatorId() { + return this.operatorId; + } + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + public void unsetOperatorId() { + this.operatorId = null; + } + + /** Returns true if field operatorId is set (has been asigned a value) and false otherwise */ + public boolean isSetOperatorId() { + return this.operatorId != null; + } + + public void setOperatorIdIsSet(boolean value) { + if (!value) { + this.operatorId = null; + } + } + + /** + * + * @see OperatorType + */ + public OperatorType getOperatorType() { + return this.operatorType; + } + + /** + * + * @see OperatorType + */ + public void setOperatorType(OperatorType operatorType) { + this.operatorType = operatorType; + } + + public void unsetOperatorType() { + this.operatorType = null; + } + + /** Returns true if field operatorType is set (has been asigned a value) and false otherwise */ + public boolean isSetOperatorType() { + return this.operatorType != null; + } + + public void setOperatorTypeIsSet(boolean value) { + if (!value) { + this.operatorType = null; + } + } + + public int getOperatorAttributesSize() { + return (this.operatorAttributes == null) ? 0 : this.operatorAttributes.size(); + } + + public void putToOperatorAttributes(String key, String val) { + if (this.operatorAttributes == null) { + this.operatorAttributes = new HashMap(); + } + this.operatorAttributes.put(key, val); + } + + public Map getOperatorAttributes() { + return this.operatorAttributes; + } + + public void setOperatorAttributes(Map operatorAttributes) { + this.operatorAttributes = operatorAttributes; + } + + public void unsetOperatorAttributes() { + this.operatorAttributes = null; + } + + /** 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(); + } + + public void putToOperatorCounters(String key, long val) { + if (this.operatorCounters == null) { + this.operatorCounters = new HashMap(); + } + this.operatorCounters.put(key, val); + } + + public Map getOperatorCounters() { + return this.operatorCounters; + } + + public void setOperatorCounters(Map operatorCounters) { + this.operatorCounters = operatorCounters; + } + + public void unsetOperatorCounters() { + this.operatorCounters = null; + } + + /** 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; + setDoneIsSet(true); + } + + public void unsetDone() { + __isset_bit_vector.clear(__DONE_ISSET_ID); + } + + /** Returns true if field done is set (has been asigned a value) and false otherwise */ + public boolean isSetDone() { + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); + } + + public boolean isStarted() { + return this.started; + } + + public void setStarted(boolean started) { + this.started = started; + setStartedIsSet(true); + } + + public void unsetStarted() { + __isset_bit_vector.clear(__STARTED_ISSET_ID); + } + + /** Returns true if field started is set (has been asigned a value) and false otherwise */ + public boolean isSetStarted() { + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + 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 { + setOperatorId((String)value); + } + break; + + case OPERATOR_TYPE: + if (value == null) { + unsetOperatorType(); + } else { + setOperatorType((OperatorType)value); + } + break; + + case OPERATOR_ATTRIBUTES: + if (value == null) { + unsetOperatorAttributes(); + } else { + setOperatorAttributes((Map)value); + } + break; + + case OPERATOR_COUNTERS: + if (value == null) { + unsetOperatorCounters(); + } else { + setOperatorCounters((Map)value); + } + break; + + case DONE: + if (value == null) { + unsetDone(); + } else { + setDone((Boolean)value); + } + break; + + case STARTED: + if (value == null) { + unsetStarted(); + } else { + setStarted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case OPERATOR_ID: + return getOperatorId(); + + case OPERATOR_TYPE: + return getOperatorType(); + + case OPERATOR_ATTRIBUTES: + return getOperatorAttributes(); + + case OPERATOR_COUNTERS: + return getOperatorCounters(); + + case DONE: + return new Boolean(isDone()); + + case STARTED: + return new Boolean(isStarted()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case OPERATOR_ID: + return isSetOperatorId(); + case OPERATOR_TYPE: + return isSetOperatorType(); + case OPERATOR_ATTRIBUTES: + return isSetOperatorAttributes(); + case OPERATOR_COUNTERS: + return isSetOperatorCounters(); + case DONE: + return isSetDone(); + case STARTED: + return isSetStarted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Operator) + return this.equals((Operator)that); + return false; + } + + public boolean equals(Operator that) { + if (that == null) + return false; + + boolean this_present_operatorId = true && this.isSetOperatorId(); + boolean that_present_operatorId = true && that.isSetOperatorId(); + if (this_present_operatorId || that_present_operatorId) { + if (!(this_present_operatorId && that_present_operatorId)) + return false; + if (!this.operatorId.equals(that.operatorId)) + return false; + } + + 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.equals(that.operatorType)) + return false; + } + + boolean this_present_operatorAttributes = true && this.isSetOperatorAttributes(); + boolean that_present_operatorAttributes = true && that.isSetOperatorAttributes(); + if (this_present_operatorAttributes || that_present_operatorAttributes) { + if (!(this_present_operatorAttributes && that_present_operatorAttributes)) + return false; + if (!this.operatorAttributes.equals(that.operatorAttributes)) + return false; + } + + boolean this_present_operatorCounters = true && this.isSetOperatorCounters(); + boolean that_present_operatorCounters = true && that.isSetOperatorCounters(); + if (this_present_operatorCounters || that_present_operatorCounters) { + if (!(this_present_operatorCounters && that_present_operatorCounters)) + return false; + if (!this.operatorCounters.equals(that.operatorCounters)) + return false; + } + + boolean this_present_done = true; + boolean that_present_done = true; + if (this_present_done || that_present_done) { + if (!(this_present_done && that_present_done)) + return false; + if (this.done != that.done) + return false; + } + + boolean this_present_started = true; + boolean that_present_started = true; + if (this_present_started || that_present_started) { + if (!(this_present_started && that_present_started)) + return false; + if (this.started != that.started) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Operator other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Operator typedOther = (Operator)other; + + lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorId()) { + lastComparison = TBaseHelper.compareTo(this.operatorId, typedOther.operatorId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorType()).compareTo(typedOther.isSetOperatorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorType()) { + lastComparison = TBaseHelper.compareTo(this.operatorType, typedOther.operatorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorAttributes()).compareTo(typedOther.isSetOperatorAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorAttributes()) { + lastComparison = TBaseHelper.compareTo(this.operatorAttributes, typedOther.operatorAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorCounters()).compareTo(typedOther.isSetOperatorCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorCounters()) { + lastComparison = TBaseHelper.compareTo(this.operatorCounters, typedOther.operatorCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // OPERATOR_ID + if (field.type == TType.STRING) { + this.operatorId = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // OPERATOR_TYPE + if (field.type == TType.I32) { + this.operatorType = OperatorType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // OPERATOR_ATTRIBUTES + if (field.type == TType.MAP) { + { + TMap _map12 = iprot.readMapBegin(); + this.operatorAttributes = new HashMap(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + String _key14; + String _val15; + _key14 = iprot.readString(); + _val15 = iprot.readString(); + this.operatorAttributes.put(_key14, _val15); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // OPERATOR_COUNTERS + if (field.type == TType.MAP) { + { + TMap _map16 = iprot.readMapBegin(); + this.operatorCounters = new HashMap(2*_map16.size); + for (int _i17 = 0; _i17 < _map16.size; ++_i17) + { + String _key18; + long _val19; + _key18 = iprot.readString(); + _val19 = iprot.readI64(); + this.operatorCounters.put(_key18, _val19); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // DONE + if (field.type == TType.BOOL) { + this.done = iprot.readBool(); + setDoneIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // STARTED + if (field.type == TType.BOOL) { + this.started = iprot.readBool(); + setStartedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.operatorId != null) { + oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); + oprot.writeString(this.operatorId); + 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()) + { + oprot.writeString(_iter20.getKey()); + oprot.writeString(_iter20.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.operatorCounters != null) { + oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.operatorCounters.size())); + for (Map.Entry _iter21 : this.operatorCounters.entrySet()) + { + oprot.writeString(_iter21.getKey()); + oprot.writeI64(_iter21.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(this.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(this.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Operator("); + boolean first = true; + + sb.append("operatorId:"); + if (this.operatorId == null) { + sb.append("null"); + } else { + sb.append(this.operatorId); + } + first = false; + if (!first) sb.append(", "); + sb.append("operatorType:"); + if (this.operatorType == null) { + sb.append("null"); + } else { + sb.append(this.operatorType); + } + first = false; + if (!first) sb.append(", "); + sb.append("operatorAttributes:"); + if (this.operatorAttributes == null) { + sb.append("null"); + } else { + sb.append(this.operatorAttributes); + } + first = false; + if (!first) sb.append(", "); + sb.append("operatorCounters:"); + if (this.operatorCounters == null) { + sb.append("null"); + } else { + sb.append(this.operatorCounters); + } + first = false; + if (!first) sb.append(", "); + sb.append("done:"); + sb.append(this.done); + first = false; + if (!first) sb.append(", "); + sb.append("started:"); + sb.append(this.started); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java new file mode 100644 index 0000000..cd01b4d --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java @@ -0,0 +1,92 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum OperatorType implements TEnum { + JOIN(0), + MAPJOIN(1), + EXTRACT(2), + FILTER(3), + FORWARD(4), + GROUPBY(5), + LIMIT(6), + SCRIPT(7), + SELECT(8), + TABLESCAN(9), + FILESINK(10), + REDUCESINK(11), + UNION(12), + UDTF(13), + LATERALVIEWJOIN(14), + LATERALVIEWFORWARD(15), + HASHTABLESINK(16), + HASHTABLEDUMMY(17); + + private final int value; + + 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; + case 16: + return HASHTABLESINK; + case 17: + return HASHTABLEDUMMY; + default: + return null; + } + } +} diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java new file mode 100644 index 0000000..32ce844 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java @@ -0,0 +1,1044 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField QUERY_COUNTERS_FIELD_DESC = new TField("queryCounters", TType.MAP, (short)4); + private static final TField STAGE_GRAPH_FIELD_DESC = new TField("stageGraph", TType.STRUCT, (short)5); + private static final TField STAGE_LIST_FIELD_DESC = new TField("stageList", TType.LIST, (short)6); + private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7); + private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8); + + private String queryId; + private String queryType; + private Map queryAttributes; + private Map queryCounters; + private Graph stageGraph; + private List stageList; + private boolean done; + private boolean started; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.QUERY_TYPE, new FieldMetaData("queryType", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.QUERY_ATTRIBUTES, new FieldMetaData("queryAttributes", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.QUERY_COUNTERS, new FieldMetaData("queryCounters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.I64)))); + tmpMap.put(_Fields.STAGE_GRAPH, new FieldMetaData("stageGraph", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Graph.class))); + tmpMap.put(_Fields.STAGE_LIST, new FieldMetaData("stageList", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Stage.class)))); + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Query.class, metaDataMap); + } + + public Query() { + } + + public Query( + String queryId, + String queryType, + Map queryAttributes, + Map queryCounters, + Graph stageGraph, + List stageList, + boolean done, + boolean started) + { + this(); + this.queryId = queryId; + this.queryType = queryType; + this.queryAttributes = queryAttributes; + this.queryCounters = queryCounters; + this.stageGraph = stageGraph; + this.stageList = stageList; + this.done = done; + setDoneIsSet(true); + this.started = started; + 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; + } + if (other.isSetQueryType()) { + this.queryType = other.queryType; + } + if (other.isSetQueryAttributes()) { + Map __this__queryAttributes = new HashMap(); + for (Map.Entry other_element : other.queryAttributes.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__queryAttributes_copy_key = other_element_key; + + String __this__queryAttributes_copy_value = other_element_value; + + __this__queryAttributes.put(__this__queryAttributes_copy_key, __this__queryAttributes_copy_value); + } + this.queryAttributes = __this__queryAttributes; + } + if (other.isSetQueryCounters()) { + Map __this__queryCounters = new HashMap(); + for (Map.Entry other_element : other.queryCounters.entrySet()) { + + String other_element_key = other_element.getKey(); + Long other_element_value = other_element.getValue(); + + String __this__queryCounters_copy_key = other_element_key; + + Long __this__queryCounters_copy_value = other_element_value; + + __this__queryCounters.put(__this__queryCounters_copy_key, __this__queryCounters_copy_value); + } + this.queryCounters = __this__queryCounters; + } + if (other.isSetStageGraph()) { + this.stageGraph = new Graph(other.stageGraph); + } + if (other.isSetStageList()) { + List __this__stageList = new ArrayList(); + for (Stage other_element : other.stageList) { + __this__stageList.add(new Stage(other_element)); + } + this.stageList = __this__stageList; + } + this.done = other.done; + this.started = other.started; + } + + public Query deepCopy() { + return new Query(this); + } + + @Override + public void clear() { + this.queryId = null; + this.queryType = null; + this.queryAttributes = null; + this.queryCounters = null; + this.stageGraph = null; + this.stageList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + + public String getQueryId() { + return this.queryId; + } + + public void setQueryId(String queryId) { + this.queryId = queryId; + } + + public void unsetQueryId() { + this.queryId = null; + } + + /** 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; + } + + public void setQueryType(String queryType) { + this.queryType = queryType; + } + + public void unsetQueryType() { + this.queryType = null; + } + + /** 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(); + } + + public void putToQueryAttributes(String key, String val) { + if (this.queryAttributes == null) { + this.queryAttributes = new HashMap(); + } + this.queryAttributes.put(key, val); + } + + public Map getQueryAttributes() { + return this.queryAttributes; + } + + public void setQueryAttributes(Map queryAttributes) { + this.queryAttributes = queryAttributes; + } + + public void unsetQueryAttributes() { + this.queryAttributes = null; + } + + /** 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(); + } + + public void putToQueryCounters(String key, long val) { + if (this.queryCounters == null) { + this.queryCounters = new HashMap(); + } + this.queryCounters.put(key, val); + } + + public Map getQueryCounters() { + return this.queryCounters; + } + + public void setQueryCounters(Map queryCounters) { + this.queryCounters = queryCounters; + } + + public void unsetQueryCounters() { + this.queryCounters = null; + } + + /** 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; + } + + public void setStageGraph(Graph stageGraph) { + this.stageGraph = stageGraph; + } + + public void unsetStageGraph() { + this.stageGraph = null; + } + + /** 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(); + } + + public java.util.Iterator getStageListIterator() { + return (this.stageList == null) ? null : this.stageList.iterator(); + } + + public void addToStageList(Stage elem) { + if (this.stageList == null) { + this.stageList = new ArrayList(); + } + this.stageList.add(elem); + } + + public List getStageList() { + return this.stageList; + } + + public void setStageList(List stageList) { + this.stageList = stageList; + } + + public void unsetStageList() { + this.stageList = null; + } + + /** 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; + setDoneIsSet(true); + } + + public void unsetDone() { + __isset_bit_vector.clear(__DONE_ISSET_ID); + } + + /** Returns true if field done is set (has been asigned a value) and false otherwise */ + public boolean isSetDone() { + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); + } + + public boolean isStarted() { + return this.started; + } + + public void setStarted(boolean started) { + this.started = started; + setStartedIsSet(true); + } + + public void unsetStarted() { + __isset_bit_vector.clear(__STARTED_ISSET_ID); + } + + /** Returns true if field started is set (has been asigned a value) and false otherwise */ + public boolean isSetStarted() { + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + 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 { + setQueryId((String)value); + } + break; + + case QUERY_TYPE: + if (value == null) { + unsetQueryType(); + } else { + setQueryType((String)value); + } + break; + + case QUERY_ATTRIBUTES: + if (value == null) { + unsetQueryAttributes(); + } else { + setQueryAttributes((Map)value); + } + break; + + case QUERY_COUNTERS: + if (value == null) { + unsetQueryCounters(); + } else { + setQueryCounters((Map)value); + } + break; + + case STAGE_GRAPH: + if (value == null) { + unsetStageGraph(); + } else { + setStageGraph((Graph)value); + } + break; + + case STAGE_LIST: + if (value == null) { + unsetStageList(); + } else { + setStageList((List)value); + } + break; + + case DONE: + if (value == null) { + unsetDone(); + } else { + setDone((Boolean)value); + } + break; + + case STARTED: + if (value == null) { + unsetStarted(); + } else { + setStarted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case QUERY_ID: + return getQueryId(); + + case QUERY_TYPE: + return getQueryType(); + + case QUERY_ATTRIBUTES: + return getQueryAttributes(); + + case QUERY_COUNTERS: + return getQueryCounters(); + + case STAGE_GRAPH: + return getStageGraph(); + + case STAGE_LIST: + return getStageList(); + + case DONE: + return new Boolean(isDone()); + + case STARTED: + return new Boolean(isStarted()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case QUERY_ID: + return isSetQueryId(); + case QUERY_TYPE: + return isSetQueryType(); + case QUERY_ATTRIBUTES: + return isSetQueryAttributes(); + case QUERY_COUNTERS: + return isSetQueryCounters(); + case STAGE_GRAPH: + return isSetStageGraph(); + case STAGE_LIST: + return isSetStageList(); + case DONE: + return isSetDone(); + case STARTED: + return isSetStarted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Query) + return this.equals((Query)that); + return false; + } + + public boolean equals(Query that) { + if (that == null) + return false; + + boolean this_present_queryId = true && this.isSetQueryId(); + boolean that_present_queryId = true && that.isSetQueryId(); + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (!this.queryId.equals(that.queryId)) + return false; + } + + boolean this_present_queryType = true && this.isSetQueryType(); + boolean that_present_queryType = true && that.isSetQueryType(); + if (this_present_queryType || that_present_queryType) { + if (!(this_present_queryType && that_present_queryType)) + return false; + if (!this.queryType.equals(that.queryType)) + return false; + } + + boolean this_present_queryAttributes = true && this.isSetQueryAttributes(); + boolean that_present_queryAttributes = true && that.isSetQueryAttributes(); + if (this_present_queryAttributes || that_present_queryAttributes) { + if (!(this_present_queryAttributes && that_present_queryAttributes)) + return false; + if (!this.queryAttributes.equals(that.queryAttributes)) + return false; + } + + boolean this_present_queryCounters = true && this.isSetQueryCounters(); + boolean that_present_queryCounters = true && that.isSetQueryCounters(); + if (this_present_queryCounters || that_present_queryCounters) { + if (!(this_present_queryCounters && that_present_queryCounters)) + return false; + if (!this.queryCounters.equals(that.queryCounters)) + return false; + } + + boolean this_present_stageGraph = true && this.isSetStageGraph(); + boolean that_present_stageGraph = true && that.isSetStageGraph(); + if (this_present_stageGraph || that_present_stageGraph) { + if (!(this_present_stageGraph && that_present_stageGraph)) + return false; + if (!this.stageGraph.equals(that.stageGraph)) + return false; + } + + boolean this_present_stageList = true && this.isSetStageList(); + boolean that_present_stageList = true && that.isSetStageList(); + if (this_present_stageList || that_present_stageList) { + if (!(this_present_stageList && that_present_stageList)) + return false; + if (!this.stageList.equals(that.stageList)) + return false; + } + + boolean this_present_done = true; + boolean that_present_done = true; + if (this_present_done || that_present_done) { + if (!(this_present_done && that_present_done)) + return false; + if (this.done != that.done) + return false; + } + + boolean this_present_started = true; + boolean that_present_started = true; + if (this_present_started || that_present_started) { + if (!(this_present_started && that_present_started)) + return false; + if (this.started != that.started) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Query other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Query typedOther = (Query)other; + + lastComparison = Boolean.valueOf(isSetQueryId()).compareTo(typedOther.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = TBaseHelper.compareTo(this.queryId, typedOther.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryType()).compareTo(typedOther.isSetQueryType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryType()) { + lastComparison = TBaseHelper.compareTo(this.queryType, typedOther.queryType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryAttributes()).compareTo(typedOther.isSetQueryAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryAttributes()) { + lastComparison = TBaseHelper.compareTo(this.queryAttributes, typedOther.queryAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryCounters()).compareTo(typedOther.isSetQueryCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryCounters()) { + lastComparison = TBaseHelper.compareTo(this.queryCounters, typedOther.queryCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageGraph()).compareTo(typedOther.isSetStageGraph()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageGraph()) { + lastComparison = TBaseHelper.compareTo(this.stageGraph, typedOther.stageGraph); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageList()).compareTo(typedOther.isSetStageList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageList()) { + lastComparison = TBaseHelper.compareTo(this.stageList, typedOther.stageList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // QUERY_ID + if (field.type == TType.STRING) { + this.queryId = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // QUERY_TYPE + if (field.type == TType.STRING) { + this.queryType = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // QUERY_ATTRIBUTES + if (field.type == TType.MAP) { + { + TMap _map50 = iprot.readMapBegin(); + this.queryAttributes = new HashMap(2*_map50.size); + for (int _i51 = 0; _i51 < _map50.size; ++_i51) + { + String _key52; + String _val53; + _key52 = iprot.readString(); + _val53 = iprot.readString(); + this.queryAttributes.put(_key52, _val53); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // QUERY_COUNTERS + if (field.type == TType.MAP) { + { + TMap _map54 = iprot.readMapBegin(); + this.queryCounters = new HashMap(2*_map54.size); + for (int _i55 = 0; _i55 < _map54.size; ++_i55) + { + String _key56; + long _val57; + _key56 = iprot.readString(); + _val57 = iprot.readI64(); + this.queryCounters.put(_key56, _val57); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // STAGE_GRAPH + if (field.type == TType.STRUCT) { + this.stageGraph = new Graph(); + this.stageGraph.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // STAGE_LIST + if (field.type == TType.LIST) { + { + TList _list58 = iprot.readListBegin(); + this.stageList = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) + { + Stage _elem60; + _elem60 = new Stage(); + _elem60.read(iprot); + this.stageList.add(_elem60); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // DONE + if (field.type == TType.BOOL) { + this.done = iprot.readBool(); + setDoneIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // STARTED + if (field.type == TType.BOOL) { + this.started = iprot.readBool(); + setStartedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.queryId != null) { + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeString(this.queryId); + oprot.writeFieldEnd(); + } + if (this.queryType != null) { + oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); + oprot.writeString(this.queryType); + oprot.writeFieldEnd(); + } + if (this.queryAttributes != null) { + oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.queryAttributes.size())); + for (Map.Entry _iter61 : this.queryAttributes.entrySet()) + { + oprot.writeString(_iter61.getKey()); + oprot.writeString(_iter61.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.queryCounters != null) { + oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.queryCounters.size())); + for (Map.Entry _iter62 : this.queryCounters.entrySet()) + { + oprot.writeString(_iter62.getKey()); + oprot.writeI64(_iter62.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.stageGraph != null) { + oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); + this.stageGraph.write(oprot); + oprot.writeFieldEnd(); + } + if (this.stageList != null) { + oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.stageList.size())); + for (Stage _iter63 : this.stageList) + { + _iter63.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(this.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(this.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Query("); + boolean first = true; + + sb.append("queryId:"); + if (this.queryId == null) { + sb.append("null"); + } else { + sb.append(this.queryId); + } + first = false; + if (!first) sb.append(", "); + sb.append("queryType:"); + if (this.queryType == null) { + sb.append("null"); + } else { + sb.append(this.queryType); + } + first = false; + if (!first) sb.append(", "); + sb.append("queryAttributes:"); + if (this.queryAttributes == null) { + sb.append("null"); + } else { + sb.append(this.queryAttributes); + } + first = false; + if (!first) sb.append(", "); + sb.append("queryCounters:"); + if (this.queryCounters == null) { + sb.append("null"); + } else { + sb.append(this.queryCounters); + } + first = false; + if (!first) sb.append(", "); + sb.append("stageGraph:"); + if (this.stageGraph == null) { + sb.append("null"); + } else { + sb.append(this.stageGraph); + } + first = false; + if (!first) sb.append(", "); + sb.append("stageList:"); + if (this.stageList == null) { + sb.append("null"); + } else { + sb.append(this.stageList); + } + first = false; + if (!first) sb.append(", "); + sb.append("done:"); + sb.append(this.done); + first = false; + if (!first) sb.append(", "); + sb.append("started:"); + sb.append(this.started); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java new file mode 100644 index 0000000..ea18040 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java @@ -0,0 +1,513 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private boolean done; + private boolean started; + + /** 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; + } + } + + // 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)))); + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(QueryPlan.class, metaDataMap); + } + + public QueryPlan() { + } + + public QueryPlan( + List queries, + boolean done, + boolean started) + { + this(); + this.queries = queries; + this.done = done; + setDoneIsSet(true); + this.started = started; + 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) { + __this__queries.add(new Query(other_element)); + } + this.queries = __this__queries; + } + this.done = other.done; + this.started = other.started; + } + + public QueryPlan deepCopy() { + return new QueryPlan(this); + } + + @Override + public void clear() { + this.queries = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + + public int getQueriesSize() { + return (this.queries == null) ? 0 : this.queries.size(); + } + + public java.util.Iterator getQueriesIterator() { + return (this.queries == null) ? null : this.queries.iterator(); + } + + public void addToQueries(Query elem) { + if (this.queries == null) { + this.queries = new ArrayList(); + } + this.queries.add(elem); + } + + public List getQueries() { + return this.queries; + } + + public void setQueries(List queries) { + this.queries = queries; + } + + public void unsetQueries() { + this.queries = null; + } + + /** 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; + setDoneIsSet(true); + } + + public void unsetDone() { + __isset_bit_vector.clear(__DONE_ISSET_ID); + } + + /** Returns true if field done is set (has been asigned a value) and false otherwise */ + public boolean isSetDone() { + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); + } + + public boolean isStarted() { + return this.started; + } + + public void setStarted(boolean started) { + this.started = started; + setStartedIsSet(true); + } + + public void unsetStarted() { + __isset_bit_vector.clear(__STARTED_ISSET_ID); + } + + /** Returns true if field started is set (has been asigned a value) and false otherwise */ + public boolean isSetStarted() { + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + 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(); + } else { + setQueries((List)value); + } + break; + + case DONE: + if (value == null) { + unsetDone(); + } else { + setDone((Boolean)value); + } + break; + + case STARTED: + if (value == null) { + unsetStarted(); + } else { + setStarted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case QUERIES: + return getQueries(); + + case DONE: + return new Boolean(isDone()); + + case STARTED: + return new Boolean(isStarted()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case QUERIES: + return isSetQueries(); + case DONE: + return isSetDone(); + case STARTED: + return isSetStarted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof QueryPlan) + return this.equals((QueryPlan)that); + return false; + } + + public boolean equals(QueryPlan that) { + if (that == null) + return false; + + boolean this_present_queries = true && this.isSetQueries(); + boolean that_present_queries = true && that.isSetQueries(); + if (this_present_queries || that_present_queries) { + if (!(this_present_queries && that_present_queries)) + return false; + if (!this.queries.equals(that.queries)) + return false; + } + + boolean this_present_done = true; + boolean that_present_done = true; + if (this_present_done || that_present_done) { + if (!(this_present_done && that_present_done)) + return false; + if (this.done != that.done) + return false; + } + + boolean this_present_started = true; + boolean that_present_started = true; + if (this_present_started || that_present_started) { + if (!(this_present_started && that_present_started)) + return false; + if (this.started != that.started) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(QueryPlan other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + QueryPlan typedOther = (QueryPlan)other; + + lastComparison = Boolean.valueOf(isSetQueries()).compareTo(typedOther.isSetQueries()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueries()) { + lastComparison = TBaseHelper.compareTo(this.queries, typedOther.queries); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // QUERIES + if (field.type == TType.LIST) { + { + TList _list64 = iprot.readListBegin(); + this.queries = new ArrayList(_list64.size); + for (int _i65 = 0; _i65 < _list64.size; ++_i65) + { + Query _elem66; + _elem66 = new Query(); + _elem66.read(iprot); + this.queries.add(_elem66); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DONE + if (field.type == TType.BOOL) { + this.done = iprot.readBool(); + setDoneIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // STARTED + if (field.type == TType.BOOL) { + this.started = iprot.readBool(); + setStartedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.queries != null) { + oprot.writeFieldBegin(QUERIES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.queries.size())); + for (Query _iter67 : this.queries) + { + _iter67.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(this.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(this.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("QueryPlan("); + boolean first = true; + + sb.append("queries:"); + if (this.queries == null) { + sb.append("null"); + } else { + sb.append(this.queries); + } + first = false; + if (!first) sb.append(", "); + sb.append("done:"); + sb.append(this.done); + first = false; + if (!first) sb.append(", "); + sb.append("started:"); + sb.append(this.started); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java new file mode 100644 index 0000000..4a852bd --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java @@ -0,0 +1,967 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField STAGE_COUNTERS_FIELD_DESC = new TField("stageCounters", TType.MAP, (short)4); + private static final TField TASK_LIST_FIELD_DESC = new TField("taskList", TType.LIST, (short)5); + private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)6); + private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)7); + + private String stageId; + private StageType stageType; + private Map stageAttributes; + private Map stageCounters; + private List taskList; + private boolean done; + private boolean started; + + /** 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; + } + } + + // 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))); + 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)))); + tmpMap.put(_Fields.STAGE_COUNTERS, new FieldMetaData("stageCounters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.I64)))); + tmpMap.put(_Fields.TASK_LIST, new FieldMetaData("taskList", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Task.class)))); + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Stage.class, metaDataMap); + } + + public Stage() { + } + + public Stage( + String stageId, + StageType stageType, + Map stageAttributes, + Map stageCounters, + List taskList, + boolean done, + boolean started) + { + this(); + this.stageId = stageId; + this.stageType = stageType; + this.stageAttributes = stageAttributes; + this.stageCounters = stageCounters; + this.taskList = taskList; + this.done = done; + setDoneIsSet(true); + this.started = started; + 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; + } + if (other.isSetStageType()) { + this.stageType = other.stageType; + } + if (other.isSetStageAttributes()) { + Map __this__stageAttributes = new HashMap(); + for (Map.Entry other_element : other.stageAttributes.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__stageAttributes_copy_key = other_element_key; + + String __this__stageAttributes_copy_value = other_element_value; + + __this__stageAttributes.put(__this__stageAttributes_copy_key, __this__stageAttributes_copy_value); + } + this.stageAttributes = __this__stageAttributes; + } + if (other.isSetStageCounters()) { + Map __this__stageCounters = new HashMap(); + for (Map.Entry other_element : other.stageCounters.entrySet()) { + + String other_element_key = other_element.getKey(); + Long other_element_value = other_element.getValue(); + + String __this__stageCounters_copy_key = other_element_key; + + Long __this__stageCounters_copy_value = other_element_value; + + __this__stageCounters.put(__this__stageCounters_copy_key, __this__stageCounters_copy_value); + } + this.stageCounters = __this__stageCounters; + } + if (other.isSetTaskList()) { + List __this__taskList = new ArrayList(); + for (Task other_element : other.taskList) { + __this__taskList.add(new Task(other_element)); + } + this.taskList = __this__taskList; + } + this.done = other.done; + this.started = other.started; + } + + public Stage deepCopy() { + return new Stage(this); + } + + @Override + public void clear() { + this.stageId = null; + this.stageType = null; + this.stageAttributes = null; + this.stageCounters = null; + this.taskList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + + public String getStageId() { + return this.stageId; + } + + public void setStageId(String stageId) { + this.stageId = stageId; + } + + public void unsetStageId() { + this.stageId = null; + } + + /** Returns true if field stageId is set (has been asigned a value) and false otherwise */ + public boolean isSetStageId() { + return this.stageId != null; + } + + public void setStageIdIsSet(boolean value) { + if (!value) { + this.stageId = null; + } + } + + /** + * + * @see StageType + */ + public StageType getStageType() { + return this.stageType; + } + + /** + * + * @see StageType + */ + public void setStageType(StageType stageType) { + this.stageType = stageType; + } + + public void unsetStageType() { + this.stageType = null; + } + + /** Returns true if field stageType is set (has been asigned a value) and false otherwise */ + public boolean isSetStageType() { + return this.stageType != null; + } + + public void setStageTypeIsSet(boolean value) { + if (!value) { + this.stageType = null; + } + } + + public int getStageAttributesSize() { + return (this.stageAttributes == null) ? 0 : this.stageAttributes.size(); + } + + public void putToStageAttributes(String key, String val) { + if (this.stageAttributes == null) { + this.stageAttributes = new HashMap(); + } + this.stageAttributes.put(key, val); + } + + public Map getStageAttributes() { + return this.stageAttributes; + } + + public void setStageAttributes(Map stageAttributes) { + this.stageAttributes = stageAttributes; + } + + public void unsetStageAttributes() { + this.stageAttributes = null; + } + + /** 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(); + } + + public void putToStageCounters(String key, long val) { + if (this.stageCounters == null) { + this.stageCounters = new HashMap(); + } + this.stageCounters.put(key, val); + } + + public Map getStageCounters() { + return this.stageCounters; + } + + public void setStageCounters(Map stageCounters) { + this.stageCounters = stageCounters; + } + + public void unsetStageCounters() { + this.stageCounters = null; + } + + /** 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(); + } + + public java.util.Iterator getTaskListIterator() { + return (this.taskList == null) ? null : this.taskList.iterator(); + } + + public void addToTaskList(Task elem) { + if (this.taskList == null) { + this.taskList = new ArrayList(); + } + this.taskList.add(elem); + } + + public List getTaskList() { + return this.taskList; + } + + public void setTaskList(List taskList) { + this.taskList = taskList; + } + + public void unsetTaskList() { + this.taskList = null; + } + + /** 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; + setDoneIsSet(true); + } + + public void unsetDone() { + __isset_bit_vector.clear(__DONE_ISSET_ID); + } + + /** Returns true if field done is set (has been asigned a value) and false otherwise */ + public boolean isSetDone() { + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); + } + + public boolean isStarted() { + return this.started; + } + + public void setStarted(boolean started) { + this.started = started; + setStartedIsSet(true); + } + + public void unsetStarted() { + __isset_bit_vector.clear(__STARTED_ISSET_ID); + } + + /** Returns true if field started is set (has been asigned a value) and false otherwise */ + public boolean isSetStarted() { + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + 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 { + setStageId((String)value); + } + break; + + case STAGE_TYPE: + if (value == null) { + unsetStageType(); + } else { + setStageType((StageType)value); + } + break; + + case STAGE_ATTRIBUTES: + if (value == null) { + unsetStageAttributes(); + } else { + setStageAttributes((Map)value); + } + break; + + case STAGE_COUNTERS: + if (value == null) { + unsetStageCounters(); + } else { + setStageCounters((Map)value); + } + break; + + case TASK_LIST: + if (value == null) { + unsetTaskList(); + } else { + setTaskList((List)value); + } + break; + + case DONE: + if (value == null) { + unsetDone(); + } else { + setDone((Boolean)value); + } + break; + + case STARTED: + if (value == null) { + unsetStarted(); + } else { + setStarted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STAGE_ID: + return getStageId(); + + case STAGE_TYPE: + return getStageType(); + + case STAGE_ATTRIBUTES: + return getStageAttributes(); + + case STAGE_COUNTERS: + return getStageCounters(); + + case TASK_LIST: + return getTaskList(); + + case DONE: + return new Boolean(isDone()); + + case STARTED: + return new Boolean(isStarted()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STAGE_ID: + return isSetStageId(); + case STAGE_TYPE: + return isSetStageType(); + case STAGE_ATTRIBUTES: + return isSetStageAttributes(); + case STAGE_COUNTERS: + return isSetStageCounters(); + case TASK_LIST: + return isSetTaskList(); + case DONE: + return isSetDone(); + case STARTED: + return isSetStarted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Stage) + return this.equals((Stage)that); + return false; + } + + public boolean equals(Stage that) { + if (that == null) + return false; + + boolean this_present_stageId = true && this.isSetStageId(); + boolean that_present_stageId = true && that.isSetStageId(); + if (this_present_stageId || that_present_stageId) { + if (!(this_present_stageId && that_present_stageId)) + return false; + if (!this.stageId.equals(that.stageId)) + return false; + } + + 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.equals(that.stageType)) + return false; + } + + boolean this_present_stageAttributes = true && this.isSetStageAttributes(); + boolean that_present_stageAttributes = true && that.isSetStageAttributes(); + if (this_present_stageAttributes || that_present_stageAttributes) { + if (!(this_present_stageAttributes && that_present_stageAttributes)) + return false; + if (!this.stageAttributes.equals(that.stageAttributes)) + return false; + } + + boolean this_present_stageCounters = true && this.isSetStageCounters(); + boolean that_present_stageCounters = true && that.isSetStageCounters(); + if (this_present_stageCounters || that_present_stageCounters) { + if (!(this_present_stageCounters && that_present_stageCounters)) + return false; + if (!this.stageCounters.equals(that.stageCounters)) + return false; + } + + boolean this_present_taskList = true && this.isSetTaskList(); + boolean that_present_taskList = true && that.isSetTaskList(); + if (this_present_taskList || that_present_taskList) { + if (!(this_present_taskList && that_present_taskList)) + return false; + if (!this.taskList.equals(that.taskList)) + return false; + } + + boolean this_present_done = true; + boolean that_present_done = true; + if (this_present_done || that_present_done) { + if (!(this_present_done && that_present_done)) + return false; + if (this.done != that.done) + return false; + } + + boolean this_present_started = true; + boolean that_present_started = true; + if (this_present_started || that_present_started) { + if (!(this_present_started && that_present_started)) + return false; + if (this.started != that.started) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Stage other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Stage typedOther = (Stage)other; + + lastComparison = Boolean.valueOf(isSetStageId()).compareTo(typedOther.isSetStageId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageId()) { + lastComparison = TBaseHelper.compareTo(this.stageId, typedOther.stageId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageType()).compareTo(typedOther.isSetStageType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageType()) { + lastComparison = TBaseHelper.compareTo(this.stageType, typedOther.stageType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageAttributes()).compareTo(typedOther.isSetStageAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageAttributes()) { + lastComparison = TBaseHelper.compareTo(this.stageAttributes, typedOther.stageAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageCounters()).compareTo(typedOther.isSetStageCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageCounters()) { + lastComparison = TBaseHelper.compareTo(this.stageCounters, typedOther.stageCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskList()).compareTo(typedOther.isSetTaskList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskList()) { + lastComparison = TBaseHelper.compareTo(this.taskList, typedOther.taskList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // STAGE_ID + if (field.type == TType.STRING) { + this.stageId = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // STAGE_TYPE + if (field.type == TType.I32) { + this.stageType = StageType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // STAGE_ATTRIBUTES + if (field.type == TType.MAP) { + { + TMap _map36 = iprot.readMapBegin(); + this.stageAttributes = new HashMap(2*_map36.size); + for (int _i37 = 0; _i37 < _map36.size; ++_i37) + { + String _key38; + String _val39; + _key38 = iprot.readString(); + _val39 = iprot.readString(); + this.stageAttributes.put(_key38, _val39); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // STAGE_COUNTERS + if (field.type == TType.MAP) { + { + TMap _map40 = iprot.readMapBegin(); + this.stageCounters = new HashMap(2*_map40.size); + for (int _i41 = 0; _i41 < _map40.size; ++_i41) + { + String _key42; + long _val43; + _key42 = iprot.readString(); + _val43 = iprot.readI64(); + this.stageCounters.put(_key42, _val43); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // TASK_LIST + if (field.type == TType.LIST) { + { + TList _list44 = iprot.readListBegin(); + this.taskList = new ArrayList(_list44.size); + for (int _i45 = 0; _i45 < _list44.size; ++_i45) + { + Task _elem46; + _elem46 = new Task(); + _elem46.read(iprot); + this.taskList.add(_elem46); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // DONE + if (field.type == TType.BOOL) { + this.done = iprot.readBool(); + setDoneIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // STARTED + if (field.type == TType.BOOL) { + this.started = iprot.readBool(); + setStartedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.stageId != null) { + oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); + oprot.writeString(this.stageId); + 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()) + { + oprot.writeString(_iter47.getKey()); + oprot.writeString(_iter47.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.stageCounters != null) { + oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.stageCounters.size())); + for (Map.Entry _iter48 : this.stageCounters.entrySet()) + { + oprot.writeString(_iter48.getKey()); + oprot.writeI64(_iter48.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.taskList != null) { + oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.taskList.size())); + for (Task _iter49 : this.taskList) + { + _iter49.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(this.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(this.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Stage("); + boolean first = true; + + sb.append("stageId:"); + if (this.stageId == null) { + sb.append("null"); + } else { + sb.append(this.stageId); + } + first = false; + if (!first) sb.append(", "); + sb.append("stageType:"); + if (this.stageType == null) { + sb.append("null"); + } else { + sb.append(this.stageType); + } + first = false; + if (!first) sb.append(", "); + sb.append("stageAttributes:"); + if (this.stageAttributes == null) { + sb.append("null"); + } else { + sb.append(this.stageAttributes); + } + first = false; + if (!first) sb.append(", "); + sb.append("stageCounters:"); + if (this.stageCounters == null) { + sb.append("null"); + } else { + sb.append(this.stageCounters); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskList:"); + if (this.taskList == null) { + sb.append("null"); + } else { + sb.append(this.taskList); + } + first = false; + if (!first) sb.append(", "); + sb.append("done:"); + sb.append(this.done); + first = false; + if (!first) sb.append(", "); + sb.append("started:"); + sb.append(this.started); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java new file mode 100644 index 0000000..305f9af --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java @@ -0,0 +1,68 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum StageType implements TEnum { + CONDITIONAL(0), + COPY(1), + DDL(2), + MAPRED(3), + EXPLAIN(4), + FETCH(5), + FUNC(6), + MAPREDLOCAL(7), + MOVE(8), + STATS(9); + + private final int value; + + 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; + case 9: + return STATS; + default: + return null; + } + } +} diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java new file mode 100644 index 0000000..ddad2a8 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java @@ -0,0 +1,1060 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField TASK_COUNTERS_FIELD_DESC = new TField("taskCounters", TType.MAP, (short)4); + private static final TField OPERATOR_GRAPH_FIELD_DESC = new TField("operatorGraph", TType.STRUCT, (short)5); + private static final TField OPERATOR_LIST_FIELD_DESC = new TField("operatorList", TType.LIST, (short)6); + private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7); + private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8); + + private String taskId; + private TaskType taskType; + private Map taskAttributes; + private Map taskCounters; + private Graph operatorGraph; + private List operatorList; + private boolean done; + private boolean started; + + /** 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; + } + } + + // 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))); + 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)))); + tmpMap.put(_Fields.TASK_COUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.I64)))); + tmpMap.put(_Fields.OPERATOR_GRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, Graph.class))); + tmpMap.put(_Fields.OPERATOR_LIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Operator.class)))); + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap); + } + + public Task() { + } + + public Task( + String taskId, + TaskType taskType, + Map taskAttributes, + Map taskCounters, + boolean done, + boolean started) + { + this(); + this.taskId = taskId; + this.taskType = taskType; + this.taskAttributes = taskAttributes; + this.taskCounters = taskCounters; + this.done = done; + setDoneIsSet(true); + this.started = started; + 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; + } + if (other.isSetTaskType()) { + this.taskType = other.taskType; + } + if (other.isSetTaskAttributes()) { + Map __this__taskAttributes = new HashMap(); + for (Map.Entry other_element : other.taskAttributes.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__taskAttributes_copy_key = other_element_key; + + String __this__taskAttributes_copy_value = other_element_value; + + __this__taskAttributes.put(__this__taskAttributes_copy_key, __this__taskAttributes_copy_value); + } + this.taskAttributes = __this__taskAttributes; + } + if (other.isSetTaskCounters()) { + Map __this__taskCounters = new HashMap(); + for (Map.Entry other_element : other.taskCounters.entrySet()) { + + String other_element_key = other_element.getKey(); + Long other_element_value = other_element.getValue(); + + String __this__taskCounters_copy_key = other_element_key; + + Long __this__taskCounters_copy_value = other_element_value; + + __this__taskCounters.put(__this__taskCounters_copy_key, __this__taskCounters_copy_value); + } + this.taskCounters = __this__taskCounters; + } + if (other.isSetOperatorGraph()) { + this.operatorGraph = new Graph(other.operatorGraph); + } + if (other.isSetOperatorList()) { + List __this__operatorList = new ArrayList(); + for (Operator other_element : other.operatorList) { + __this__operatorList.add(new Operator(other_element)); + } + this.operatorList = __this__operatorList; + } + this.done = other.done; + this.started = other.started; + } + + public Task deepCopy() { + return new Task(this); + } + + @Override + public void clear() { + this.taskId = null; + this.taskType = null; + this.taskAttributes = null; + this.taskCounters = null; + this.operatorGraph = null; + this.operatorList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + + public String getTaskId() { + return this.taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public void unsetTaskId() { + this.taskId = null; + } + + /** Returns true if field taskId is set (has been asigned a value) and false otherwise */ + public boolean isSetTaskId() { + return this.taskId != null; + } + + public void setTaskIdIsSet(boolean value) { + if (!value) { + this.taskId = null; + } + } + + /** + * + * @see TaskType + */ + public TaskType getTaskType() { + return this.taskType; + } + + /** + * + * @see TaskType + */ + public void setTaskType(TaskType taskType) { + this.taskType = taskType; + } + + public void unsetTaskType() { + this.taskType = null; + } + + /** Returns true if field taskType is set (has been asigned a value) and false otherwise */ + public boolean isSetTaskType() { + return this.taskType != null; + } + + public void setTaskTypeIsSet(boolean value) { + if (!value) { + this.taskType = null; + } + } + + public int getTaskAttributesSize() { + return (this.taskAttributes == null) ? 0 : this.taskAttributes.size(); + } + + public void putToTaskAttributes(String key, String val) { + if (this.taskAttributes == null) { + this.taskAttributes = new HashMap(); + } + this.taskAttributes.put(key, val); + } + + public Map getTaskAttributes() { + return this.taskAttributes; + } + + public void setTaskAttributes(Map taskAttributes) { + this.taskAttributes = taskAttributes; + } + + public void unsetTaskAttributes() { + this.taskAttributes = null; + } + + /** 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(); + } + + public void putToTaskCounters(String key, long val) { + if (this.taskCounters == null) { + this.taskCounters = new HashMap(); + } + this.taskCounters.put(key, val); + } + + public Map getTaskCounters() { + return this.taskCounters; + } + + public void setTaskCounters(Map taskCounters) { + this.taskCounters = taskCounters; + } + + public void unsetTaskCounters() { + this.taskCounters = null; + } + + /** 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; + } + + public void setOperatorGraph(Graph operatorGraph) { + this.operatorGraph = operatorGraph; + } + + public void unsetOperatorGraph() { + this.operatorGraph = null; + } + + /** 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(); + } + + public java.util.Iterator getOperatorListIterator() { + return (this.operatorList == null) ? null : this.operatorList.iterator(); + } + + public void addToOperatorList(Operator elem) { + if (this.operatorList == null) { + this.operatorList = new ArrayList(); + } + this.operatorList.add(elem); + } + + public List getOperatorList() { + return this.operatorList; + } + + public void setOperatorList(List operatorList) { + this.operatorList = operatorList; + } + + public void unsetOperatorList() { + this.operatorList = null; + } + + /** 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; + setDoneIsSet(true); + } + + public void unsetDone() { + __isset_bit_vector.clear(__DONE_ISSET_ID); + } + + /** Returns true if field done is set (has been asigned a value) and false otherwise */ + public boolean isSetDone() { + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); + } + + public boolean isStarted() { + return this.started; + } + + public void setStarted(boolean started) { + this.started = started; + setStartedIsSet(true); + } + + public void unsetStarted() { + __isset_bit_vector.clear(__STARTED_ISSET_ID); + } + + /** Returns true if field started is set (has been asigned a value) and false otherwise */ + public boolean isSetStarted() { + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + 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 { + setTaskId((String)value); + } + break; + + case TASK_TYPE: + if (value == null) { + unsetTaskType(); + } else { + setTaskType((TaskType)value); + } + break; + + case TASK_ATTRIBUTES: + if (value == null) { + unsetTaskAttributes(); + } else { + setTaskAttributes((Map)value); + } + break; + + case TASK_COUNTERS: + if (value == null) { + unsetTaskCounters(); + } else { + setTaskCounters((Map)value); + } + break; + + case OPERATOR_GRAPH: + if (value == null) { + unsetOperatorGraph(); + } else { + setOperatorGraph((Graph)value); + } + break; + + case OPERATOR_LIST: + if (value == null) { + unsetOperatorList(); + } else { + setOperatorList((List)value); + } + break; + + case DONE: + if (value == null) { + unsetDone(); + } else { + setDone((Boolean)value); + } + break; + + case STARTED: + if (value == null) { + unsetStarted(); + } else { + setStarted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TASK_ID: + return getTaskId(); + + case TASK_TYPE: + return getTaskType(); + + case TASK_ATTRIBUTES: + return getTaskAttributes(); + + case TASK_COUNTERS: + return getTaskCounters(); + + case OPERATOR_GRAPH: + return getOperatorGraph(); + + case OPERATOR_LIST: + return getOperatorList(); + + case DONE: + return new Boolean(isDone()); + + case STARTED: + return new Boolean(isStarted()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TASK_ID: + return isSetTaskId(); + case TASK_TYPE: + return isSetTaskType(); + case TASK_ATTRIBUTES: + return isSetTaskAttributes(); + case TASK_COUNTERS: + return isSetTaskCounters(); + case OPERATOR_GRAPH: + return isSetOperatorGraph(); + case OPERATOR_LIST: + return isSetOperatorList(); + case DONE: + return isSetDone(); + case STARTED: + return isSetStarted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Task) + return this.equals((Task)that); + return false; + } + + public boolean equals(Task that) { + if (that == null) + return false; + + boolean this_present_taskId = true && this.isSetTaskId(); + boolean that_present_taskId = true && that.isSetTaskId(); + if (this_present_taskId || that_present_taskId) { + if (!(this_present_taskId && that_present_taskId)) + return false; + if (!this.taskId.equals(that.taskId)) + return false; + } + + 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.equals(that.taskType)) + return false; + } + + boolean this_present_taskAttributes = true && this.isSetTaskAttributes(); + boolean that_present_taskAttributes = true && that.isSetTaskAttributes(); + if (this_present_taskAttributes || that_present_taskAttributes) { + if (!(this_present_taskAttributes && that_present_taskAttributes)) + return false; + if (!this.taskAttributes.equals(that.taskAttributes)) + return false; + } + + boolean this_present_taskCounters = true && this.isSetTaskCounters(); + boolean that_present_taskCounters = true && that.isSetTaskCounters(); + if (this_present_taskCounters || that_present_taskCounters) { + if (!(this_present_taskCounters && that_present_taskCounters)) + return false; + if (!this.taskCounters.equals(that.taskCounters)) + return false; + } + + boolean this_present_operatorGraph = true && this.isSetOperatorGraph(); + boolean that_present_operatorGraph = true && that.isSetOperatorGraph(); + if (this_present_operatorGraph || that_present_operatorGraph) { + if (!(this_present_operatorGraph && that_present_operatorGraph)) + return false; + if (!this.operatorGraph.equals(that.operatorGraph)) + return false; + } + + boolean this_present_operatorList = true && this.isSetOperatorList(); + boolean that_present_operatorList = true && that.isSetOperatorList(); + if (this_present_operatorList || that_present_operatorList) { + if (!(this_present_operatorList && that_present_operatorList)) + return false; + if (!this.operatorList.equals(that.operatorList)) + return false; + } + + boolean this_present_done = true; + boolean that_present_done = true; + if (this_present_done || that_present_done) { + if (!(this_present_done && that_present_done)) + return false; + if (this.done != that.done) + return false; + } + + boolean this_present_started = true; + boolean that_present_started = true; + if (this_present_started || that_present_started) { + if (!(this_present_started && that_present_started)) + return false; + if (this.started != that.started) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Task other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Task typedOther = (Task)other; + + lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskId()) { + lastComparison = TBaseHelper.compareTo(this.taskId, typedOther.taskId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskType()).compareTo(typedOther.isSetTaskType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskType()) { + lastComparison = TBaseHelper.compareTo(this.taskType, typedOther.taskType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskAttributes()).compareTo(typedOther.isSetTaskAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskAttributes()) { + lastComparison = TBaseHelper.compareTo(this.taskAttributes, typedOther.taskAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskCounters()).compareTo(typedOther.isSetTaskCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskCounters()) { + lastComparison = TBaseHelper.compareTo(this.taskCounters, typedOther.taskCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorGraph()).compareTo(typedOther.isSetOperatorGraph()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorGraph()) { + lastComparison = TBaseHelper.compareTo(this.operatorGraph, typedOther.operatorGraph); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorList()).compareTo(typedOther.isSetOperatorList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorList()) { + lastComparison = TBaseHelper.compareTo(this.operatorList, typedOther.operatorList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TASK_ID + if (field.type == TType.STRING) { + this.taskId = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TASK_TYPE + if (field.type == TType.I32) { + this.taskType = TaskType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TASK_ATTRIBUTES + if (field.type == TType.MAP) { + { + TMap _map22 = iprot.readMapBegin(); + this.taskAttributes = new HashMap(2*_map22.size); + for (int _i23 = 0; _i23 < _map22.size; ++_i23) + { + String _key24; + String _val25; + _key24 = iprot.readString(); + _val25 = iprot.readString(); + this.taskAttributes.put(_key24, _val25); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TASK_COUNTERS + if (field.type == TType.MAP) { + { + TMap _map26 = iprot.readMapBegin(); + this.taskCounters = new HashMap(2*_map26.size); + for (int _i27 = 0; _i27 < _map26.size; ++_i27) + { + String _key28; + long _val29; + _key28 = iprot.readString(); + _val29 = iprot.readI64(); + this.taskCounters.put(_key28, _val29); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // OPERATOR_GRAPH + if (field.type == TType.STRUCT) { + this.operatorGraph = new Graph(); + this.operatorGraph.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // OPERATOR_LIST + if (field.type == TType.LIST) { + { + TList _list30 = iprot.readListBegin(); + this.operatorList = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) + { + Operator _elem32; + _elem32 = new Operator(); + _elem32.read(iprot); + this.operatorList.add(_elem32); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // DONE + if (field.type == TType.BOOL) { + this.done = iprot.readBool(); + setDoneIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // STARTED + if (field.type == TType.BOOL) { + this.started = iprot.readBool(); + setStartedIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.taskId != null) { + oprot.writeFieldBegin(TASK_ID_FIELD_DESC); + oprot.writeString(this.taskId); + 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()) + { + oprot.writeString(_iter33.getKey()); + oprot.writeString(_iter33.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.taskCounters != null) { + oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.taskCounters.size())); + for (Map.Entry _iter34 : this.taskCounters.entrySet()) + { + oprot.writeString(_iter34.getKey()); + oprot.writeI64(_iter34.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.operatorGraph != null) { + if (isSetOperatorGraph()) { + oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); + this.operatorGraph.write(oprot); + oprot.writeFieldEnd(); + } + } + if (this.operatorList != null) { + if (isSetOperatorList()) { + oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.operatorList.size())); + for (Operator _iter35 : this.operatorList) + { + _iter35.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(this.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(this.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Task("); + boolean first = true; + + sb.append("taskId:"); + if (this.taskId == null) { + sb.append("null"); + } else { + sb.append(this.taskId); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskType:"); + if (this.taskType == null) { + sb.append("null"); + } else { + sb.append(this.taskType); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskAttributes:"); + if (this.taskAttributes == null) { + sb.append("null"); + } else { + sb.append(this.taskAttributes); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskCounters:"); + if (this.taskCounters == null) { + sb.append("null"); + } else { + sb.append(this.taskCounters); + } + first = false; + if (isSetOperatorGraph()) { + if (!first) sb.append(", "); + sb.append("operatorGraph:"); + if (this.operatorGraph == null) { + sb.append("null"); + } else { + sb.append(this.operatorGraph); + } + first = false; + } + if (isSetOperatorList()) { + if (!first) sb.append(", "); + sb.append("operatorList:"); + if (this.operatorList == null) { + sb.append("null"); + } else { + sb.append(this.operatorList); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("done:"); + sb.append(this.done); + first = false; + if (!first) sb.append(", "); + sb.append("started:"); + sb.append(this.started); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java new file mode 100644 index 0000000..001d495 --- /dev/null +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java @@ -0,0 +1,47 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.ql.plan.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum TaskType implements TEnum { + MAP(0), + REDUCE(1), + OTHER(2); + + private final int value; + + 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/thrift/gen-php/queryplan/queryplan_types.php ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php new file mode 100644 index 0000000..5060b0e --- /dev/null +++ ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php @@ -0,0 +1,1753 @@ + 0, + 'DISJUNCTIVE' => 1, +); + +final class AdjacencyType { + const CONJUNCTIVE = 0; + const DISJUNCTIVE = 1; + static public $__names = array( + 0 => 'CONJUNCTIVE', + 1 => 'DISJUNCTIVE', + ); +} + +$GLOBALS['E_NodeType'] = array( + 'OPERATOR' => 0, + 'STAGE' => 1, +); + +final class NodeType { + const OPERATOR = 0; + const STAGE = 1; + static public $__names = array( + 0 => 'OPERATOR', + 1 => 'STAGE', + ); +} + +$GLOBALS['E_OperatorType'] = array( + 'JOIN' => 0, + 'MAPJOIN' => 1, + 'EXTRACT' => 2, + 'FILTER' => 3, + 'FORWARD' => 4, + 'GROUPBY' => 5, + 'LIMIT' => 6, + 'SCRIPT' => 7, + 'SELECT' => 8, + 'TABLESCAN' => 9, + 'FILESINK' => 10, + 'REDUCESINK' => 11, + 'UNION' => 12, + 'UDTF' => 13, + 'LATERALVIEWJOIN' => 14, + 'LATERALVIEWFORWARD' => 15, + 'HASHTABLESINK' => 16, + 'HASHTABLEDUMMY' => 17, +); + +final class OperatorType { + const JOIN = 0; + const MAPJOIN = 1; + const EXTRACT = 2; + const FILTER = 3; + const FORWARD = 4; + const GROUPBY = 5; + const LIMIT = 6; + const SCRIPT = 7; + const SELECT = 8; + const TABLESCAN = 9; + const FILESINK = 10; + const REDUCESINK = 11; + const UNION = 12; + const UDTF = 13; + const LATERALVIEWJOIN = 14; + const LATERALVIEWFORWARD = 15; + const HASHTABLESINK = 16; + const HASHTABLEDUMMY = 17; + static public $__names = array( + 0 => 'JOIN', + 1 => 'MAPJOIN', + 2 => 'EXTRACT', + 3 => 'FILTER', + 4 => 'FORWARD', + 5 => 'GROUPBY', + 6 => 'LIMIT', + 7 => 'SCRIPT', + 8 => 'SELECT', + 9 => 'TABLESCAN', + 10 => 'FILESINK', + 11 => 'REDUCESINK', + 12 => 'UNION', + 13 => 'UDTF', + 14 => 'LATERALVIEWJOIN', + 15 => 'LATERALVIEWFORWARD', + 16 => 'HASHTABLESINK', + 17 => 'HASHTABLEDUMMY', + ); +} + +$GLOBALS['E_TaskType'] = array( + 'MAP' => 0, + 'REDUCE' => 1, + 'OTHER' => 2, +); + +final class TaskType { + const MAP = 0; + const REDUCE = 1; + const OTHER = 2; + static public $__names = array( + 0 => 'MAP', + 1 => 'REDUCE', + 2 => 'OTHER', + ); +} + +$GLOBALS['E_StageType'] = array( + 'CONDITIONAL' => 0, + 'COPY' => 1, + 'DDL' => 2, + 'MAPRED' => 3, + 'EXPLAIN' => 4, + 'FETCH' => 5, + 'FUNC' => 6, + 'MAPREDLOCAL' => 7, + 'MOVE' => 8, + 'STATS' => 9, +); + +final class StageType { + const CONDITIONAL = 0; + const COPY = 1; + const DDL = 2; + const MAPRED = 3; + const EXPLAIN = 4; + const FETCH = 5; + const FUNC = 6; + const MAPREDLOCAL = 7; + const MOVE = 8; + const STATS = 9; + static public $__names = array( + 0 => 'CONDITIONAL', + 1 => 'COPY', + 2 => 'DDL', + 3 => 'MAPRED', + 4 => 'EXPLAIN', + 5 => 'FETCH', + 6 => 'FUNC', + 7 => 'MAPREDLOCAL', + 8 => 'MOVE', + 9 => 'STATS', + ); +} + +class Adjacency { + static $_TSPEC; + + public $node = null; + public $children = null; + public $adjacencyType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'node', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'children', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['node'])) { + $this->node = $vals['node']; + } + if (isset($vals['children'])) { + $this->children = $vals['children']; + } + if (isset($vals['adjacencyType'])) { + $this->adjacencyType = $vals['adjacencyType']; + } + } + } + + public function getName() { + return 'Adjacency'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->node); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->children = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->children []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->adjacencyType); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Adjacency'); + if ($this->node !== null) { + $xfer += $output->writeFieldBegin('node', TType::STRING, 1); + $xfer += $output->writeString($this->node); + $xfer += $output->writeFieldEnd(); + } + if ($this->children !== null) { + if (!is_array($this->children)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('children', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->children)); + { + foreach ($this->children as $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyType !== null) { + $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3); + $xfer += $output->writeI32($this->adjacencyType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Graph { + static $_TSPEC; + + public $nodeType = null; + public $roots = null; + public $adjacencyList = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'nodeType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'roots', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Adjacency', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['nodeType'])) { + $this->nodeType = $vals['nodeType']; + } + if (isset($vals['roots'])) { + $this->roots = $vals['roots']; + } + if (isset($vals['adjacencyList'])) { + $this->adjacencyList = $vals['adjacencyList']; + } + } + } + + public function getName() { + return 'Graph'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->nodeType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->roots = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->roots []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->adjacencyList = array(); + $_size13 = 0; + $_etype16 = 0; + $xfer += $input->readListBegin($_etype16, $_size13); + for ($_i17 = 0; $_i17 < $_size13; ++$_i17) + { + $elem18 = null; + $elem18 = new Adjacency(); + $xfer += $elem18->read($input); + $this->adjacencyList []= $elem18; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Graph'); + if ($this->nodeType !== null) { + $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1); + $xfer += $output->writeI32($this->nodeType); + $xfer += $output->writeFieldEnd(); + } + if ($this->roots !== null) { + if (!is_array($this->roots)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('roots', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->roots)); + { + foreach ($this->roots as $iter19) + { + $xfer += $output->writeString($iter19); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyList !== null) { + if (!is_array($this->adjacencyList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->adjacencyList)); + { + foreach ($this->adjacencyList as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Operator { + static $_TSPEC; + + public $operatorId = null; + public $operatorType = null; + public $operatorAttributes = null; + public $operatorCounters = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'operatorId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'operatorType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'operatorAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'operatorCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['operatorId'])) { + $this->operatorId = $vals['operatorId']; + } + if (isset($vals['operatorType'])) { + $this->operatorType = $vals['operatorType']; + } + if (isset($vals['operatorAttributes'])) { + $this->operatorAttributes = $vals['operatorAttributes']; + } + if (isset($vals['operatorCounters'])) { + $this->operatorCounters = $vals['operatorCounters']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Operator'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->operatorId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operatorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->operatorAttributes = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->operatorAttributes[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->operatorCounters = array(); + $_size28 = 0; + $_ktype29 = 0; + $_vtype30 = 0; + $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $key33 = ''; + $val34 = 0; + $xfer += $input->readString($key33); + $xfer += $input->readI64($val34); + $this->operatorCounters[$key33] = $val34; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Operator'); + if ($this->operatorId !== null) { + $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1); + $xfer += $output->writeString($this->operatorId); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorType !== null) { + $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2); + $xfer += $output->writeI32($this->operatorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorAttributes !== null) { + if (!is_array($this->operatorAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes)); + { + foreach ($this->operatorAttributes as $kiter35 => $viter36) + { + $xfer += $output->writeString($kiter35); + $xfer += $output->writeString($viter36); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorCounters !== null) { + if (!is_array($this->operatorCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters)); + { + foreach ($this->operatorCounters as $kiter37 => $viter38) + { + $xfer += $output->writeString($kiter37); + $xfer += $output->writeI64($viter38); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 5); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 6); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Task { + static $_TSPEC; + + public $taskId = null; + public $taskType = null; + public $taskAttributes = null; + public $taskCounters = null; + public $operatorGraph = null; + public $operatorList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'taskType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'taskAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'taskCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'operatorGraph', + 'type' => TType::STRUCT, + 'class' => 'Graph', + ), + 6 => array( + 'var' => 'operatorList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Operator', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskId'])) { + $this->taskId = $vals['taskId']; + } + if (isset($vals['taskType'])) { + $this->taskType = $vals['taskType']; + } + if (isset($vals['taskAttributes'])) { + $this->taskAttributes = $vals['taskAttributes']; + } + if (isset($vals['taskCounters'])) { + $this->taskCounters = $vals['taskCounters']; + } + if (isset($vals['operatorGraph'])) { + $this->operatorGraph = $vals['operatorGraph']; + } + if (isset($vals['operatorList'])) { + $this->operatorList = $vals['operatorList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Task'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->taskId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->taskType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->taskAttributes = array(); + $_size39 = 0; + $_ktype40 = 0; + $_vtype41 = 0; + $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39); + for ($_i43 = 0; $_i43 < $_size39; ++$_i43) + { + $key44 = ''; + $val45 = ''; + $xfer += $input->readString($key44); + $xfer += $input->readString($val45); + $this->taskAttributes[$key44] = $val45; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->taskCounters = array(); + $_size46 = 0; + $_ktype47 = 0; + $_vtype48 = 0; + $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $key51 = ''; + $val52 = 0; + $xfer += $input->readString($key51); + $xfer += $input->readI64($val52); + $this->taskCounters[$key51] = $val52; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->operatorGraph = new Graph(); + $xfer += $this->operatorGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->operatorList = array(); + $_size53 = 0; + $_etype56 = 0; + $xfer += $input->readListBegin($_etype56, $_size53); + for ($_i57 = 0; $_i57 < $_size53; ++$_i57) + { + $elem58 = null; + $elem58 = new Operator(); + $xfer += $elem58->read($input); + $this->operatorList []= $elem58; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Task'); + if ($this->taskId !== null) { + $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); + $xfer += $output->writeString($this->taskId); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskType !== null) { + $xfer += $output->writeFieldBegin('taskType', TType::I32, 2); + $xfer += $output->writeI32($this->taskType); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskAttributes !== null) { + if (!is_array($this->taskAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes)); + { + foreach ($this->taskAttributes as $kiter59 => $viter60) + { + $xfer += $output->writeString($kiter59); + $xfer += $output->writeString($viter60); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskCounters !== null) { + if (!is_array($this->taskCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters)); + { + foreach ($this->taskCounters as $kiter61 => $viter62) + { + $xfer += $output->writeString($kiter61); + $xfer += $output->writeI64($viter62); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorGraph !== null) { + if (!is_object($this->operatorGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5); + $xfer += $this->operatorGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorList !== null) { + if (!is_array($this->operatorList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->operatorList)); + { + foreach ($this->operatorList as $iter63) + { + $xfer += $iter63->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Stage { + static $_TSPEC; + + public $stageId = null; + public $stageType = null; + public $stageAttributes = null; + public $stageCounters = null; + public $taskList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stageId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'stageType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'stageAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'stageCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'taskList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Task', + ), + ), + 6 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stageId'])) { + $this->stageId = $vals['stageId']; + } + if (isset($vals['stageType'])) { + $this->stageType = $vals['stageType']; + } + if (isset($vals['stageAttributes'])) { + $this->stageAttributes = $vals['stageAttributes']; + } + if (isset($vals['stageCounters'])) { + $this->stageCounters = $vals['stageCounters']; + } + if (isset($vals['taskList'])) { + $this->taskList = $vals['taskList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Stage'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->stageId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->stageType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->stageAttributes = array(); + $_size64 = 0; + $_ktype65 = 0; + $_vtype66 = 0; + $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64); + for ($_i68 = 0; $_i68 < $_size64; ++$_i68) + { + $key69 = ''; + $val70 = ''; + $xfer += $input->readString($key69); + $xfer += $input->readString($val70); + $this->stageAttributes[$key69] = $val70; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->stageCounters = array(); + $_size71 = 0; + $_ktype72 = 0; + $_vtype73 = 0; + $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71); + for ($_i75 = 0; $_i75 < $_size71; ++$_i75) + { + $key76 = ''; + $val77 = 0; + $xfer += $input->readString($key76); + $xfer += $input->readI64($val77); + $this->stageCounters[$key76] = $val77; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->taskList = array(); + $_size78 = 0; + $_etype81 = 0; + $xfer += $input->readListBegin($_etype81, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $elem83 = null; + $elem83 = new Task(); + $xfer += $elem83->read($input); + $this->taskList []= $elem83; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Stage'); + if ($this->stageId !== null) { + $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1); + $xfer += $output->writeString($this->stageId); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageType !== null) { + $xfer += $output->writeFieldBegin('stageType', TType::I32, 2); + $xfer += $output->writeI32($this->stageType); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageAttributes !== null) { + if (!is_array($this->stageAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes)); + { + foreach ($this->stageAttributes as $kiter84 => $viter85) + { + $xfer += $output->writeString($kiter84); + $xfer += $output->writeString($viter85); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageCounters !== null) { + if (!is_array($this->stageCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters)); + { + foreach ($this->stageCounters as $kiter86 => $viter87) + { + $xfer += $output->writeString($kiter86); + $xfer += $output->writeI64($viter87); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskList !== null) { + if (!is_array($this->taskList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskList', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->taskList)); + { + foreach ($this->taskList as $iter88) + { + $xfer += $iter88->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 6); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 7); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Query { + static $_TSPEC; + + public $queryId = null; + public $queryType = null; + public $queryAttributes = null; + public $queryCounters = null; + public $stageGraph = null; + public $stageList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queryId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'queryType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'queryAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'queryCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'stageGraph', + 'type' => TType::STRUCT, + 'class' => 'Graph', + ), + 6 => array( + 'var' => 'stageList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Stage', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queryId'])) { + $this->queryId = $vals['queryId']; + } + if (isset($vals['queryType'])) { + $this->queryType = $vals['queryType']; + } + if (isset($vals['queryAttributes'])) { + $this->queryAttributes = $vals['queryAttributes']; + } + if (isset($vals['queryCounters'])) { + $this->queryCounters = $vals['queryCounters']; + } + if (isset($vals['stageGraph'])) { + $this->stageGraph = $vals['stageGraph']; + } + if (isset($vals['stageList'])) { + $this->stageList = $vals['stageList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Query'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->queryAttributes = array(); + $_size89 = 0; + $_ktype90 = 0; + $_vtype91 = 0; + $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89); + for ($_i93 = 0; $_i93 < $_size89; ++$_i93) + { + $key94 = ''; + $val95 = ''; + $xfer += $input->readString($key94); + $xfer += $input->readString($val95); + $this->queryAttributes[$key94] = $val95; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->queryCounters = array(); + $_size96 = 0; + $_ktype97 = 0; + $_vtype98 = 0; + $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96); + for ($_i100 = 0; $_i100 < $_size96; ++$_i100) + { + $key101 = ''; + $val102 = 0; + $xfer += $input->readString($key101); + $xfer += $input->readI64($val102); + $this->queryCounters[$key101] = $val102; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->stageGraph = new Graph(); + $xfer += $this->stageGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->stageList = array(); + $_size103 = 0; + $_etype106 = 0; + $xfer += $input->readListBegin($_etype106, $_size103); + for ($_i107 = 0; $_i107 < $_size103; ++$_i107) + { + $elem108 = null; + $elem108 = new Stage(); + $xfer += $elem108->read($input); + $this->stageList []= $elem108; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Query'); + if ($this->queryId !== null) { + $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1); + $xfer += $output->writeString($this->queryId); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryType !== null) { + $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2); + $xfer += $output->writeString($this->queryType); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryAttributes !== null) { + if (!is_array($this->queryAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes)); + { + foreach ($this->queryAttributes as $kiter109 => $viter110) + { + $xfer += $output->writeString($kiter109); + $xfer += $output->writeString($viter110); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->queryCounters !== null) { + if (!is_array($this->queryCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters)); + { + foreach ($this->queryCounters as $kiter111 => $viter112) + { + $xfer += $output->writeString($kiter111); + $xfer += $output->writeI64($viter112); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageGraph !== null) { + if (!is_object($this->stageGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5); + $xfer += $this->stageGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageList !== null) { + if (!is_array($this->stageList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->stageList)); + { + foreach ($this->stageList as $iter113) + { + $xfer += $iter113->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class QueryPlan { + static $_TSPEC; + + public $queries = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queries', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Query', + ), + ), + 2 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queries'])) { + $this->queries = $vals['queries']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'QueryPlan'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->queries = array(); + $_size114 = 0; + $_etype117 = 0; + $xfer += $input->readListBegin($_etype117, $_size114); + for ($_i118 = 0; $_i118 < $_size114; ++$_i118) + { + $elem119 = null; + $elem119 = new Query(); + $xfer += $elem119->read($input); + $this->queries []= $elem119; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('QueryPlan'); + if ($this->queries !== null) { + if (!is_array($this->queries)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queries', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->queries)); + { + foreach ($this->queries as $iter120) + { + $xfer += $iter120->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 2); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 3); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git ql/src/gen/thrift/gen-py/__init__.py ql/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git ql/src/gen/thrift/gen-py/queryplan/__init__.py ql/src/gen/thrift/gen-py/queryplan/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ ql/src/gen/thrift/gen-py/queryplan/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git ql/src/gen/thrift/gen-py/queryplan/constants.py ql/src/gen/thrift/gen-py/queryplan/constants.py new file mode 100644 index 0000000..2f17ec3 --- /dev/null +++ ql/src/gen/thrift/gen-py/queryplan/constants.py @@ -0,0 +1,9 @@ +# +# 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 ql/src/gen/thrift/gen-py/queryplan/ttypes.py ql/src/gen/thrift/gen-py/queryplan/ttypes.py new file mode 100644 index 0000000..c3b165d --- /dev/null +++ ql/src/gen/thrift/gen-py/queryplan/ttypes.py @@ -0,0 +1,1089 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +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 + EXTRACT = 2 + FILTER = 3 + FORWARD = 4 + GROUPBY = 5 + LIMIT = 6 + SCRIPT = 7 + SELECT = 8 + TABLESCAN = 9 + FILESINK = 10 + REDUCESINK = 11 + UNION = 12 + UDTF = 13 + LATERALVIEWJOIN = 14 + LATERALVIEWFORWARD = 15 + HASHTABLESINK = 16 + HASHTABLEDUMMY = 17 + + _VALUES_TO_NAMES = { + 0: "JOIN", + 1: "MAPJOIN", + 2: "EXTRACT", + 3: "FILTER", + 4: "FORWARD", + 5: "GROUPBY", + 6: "LIMIT", + 7: "SCRIPT", + 8: "SELECT", + 9: "TABLESCAN", + 10: "FILESINK", + 11: "REDUCESINK", + 12: "UNION", + 13: "UDTF", + 14: "LATERALVIEWJOIN", + 15: "LATERALVIEWFORWARD", + 16: "HASHTABLESINK", + 17: "HASHTABLEDUMMY", + } + + _NAMES_TO_VALUES = { + "JOIN": 0, + "MAPJOIN": 1, + "EXTRACT": 2, + "FILTER": 3, + "FORWARD": 4, + "GROUPBY": 5, + "LIMIT": 6, + "SCRIPT": 7, + "SELECT": 8, + "TABLESCAN": 9, + "FILESINK": 10, + "REDUCESINK": 11, + "UNION": 12, + "UDTF": 13, + "LATERALVIEWJOIN": 14, + "LATERALVIEWFORWARD": 15, + "HASHTABLESINK": 16, + "HASHTABLEDUMMY": 17, + } + +class TaskType: + MAP = 0 + REDUCE = 1 + OTHER = 2 + + _VALUES_TO_NAMES = { + 0: "MAP", + 1: "REDUCE", + 2: "OTHER", + } + + _NAMES_TO_VALUES = { + "MAP": 0, + "REDUCE": 1, + "OTHER": 2, + } + +class StageType: + CONDITIONAL = 0 + COPY = 1 + DDL = 2 + MAPRED = 3 + EXPLAIN = 4 + FETCH = 5 + FUNC = 6 + MAPREDLOCAL = 7 + MOVE = 8 + STATS = 9 + + _VALUES_TO_NAMES = { + 0: "CONDITIONAL", + 1: "COPY", + 2: "DDL", + 3: "MAPRED", + 4: "EXPLAIN", + 5: "FETCH", + 6: "FUNC", + 7: "MAPREDLOCAL", + 8: "MOVE", + 9: "STATS", + } + + _NAMES_TO_VALUES = { + "CONDITIONAL": 0, + "COPY": 1, + "DDL": 2, + "MAPRED": 3, + "EXPLAIN": 4, + "FETCH": 5, + "FUNC": 6, + "MAPREDLOCAL": 7, + "MOVE": 8, + "STATS": 9, + } + + +class Adjacency: + """ + Attributes: + - node + - children + - adjacencyType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'node', None, None, ), # 1 + (2, TType.LIST, 'children', (TType.STRING,None), None, ), # 2 + (3, TType.I32, 'adjacencyType', None, None, ), # 3 + ) + + def __init__(self, node=None, children=None, adjacencyType=None,): + self.node = node + self.children = children + self.adjacencyType = adjacencyType + + 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.node = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.children = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = iprot.readString(); + self.children.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.adjacencyType = 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('Adjacency') + if self.node != None: + oprot.writeFieldBegin('node', TType.STRING, 1) + oprot.writeString(self.node) + oprot.writeFieldEnd() + if self.children != None: + oprot.writeFieldBegin('children', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.children)) + for iter6 in self.children: + oprot.writeString(iter6) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.adjacencyType != None: + oprot.writeFieldBegin('adjacencyType', TType.I32, 3) + oprot.writeI32(self.adjacencyType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Graph: + """ + Attributes: + - nodeType + - roots + - adjacencyList + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'nodeType', None, None, ), # 1 + (2, TType.LIST, 'roots', (TType.STRING,None), None, ), # 2 + (3, TType.LIST, 'adjacencyList', (TType.STRUCT,(Adjacency, Adjacency.thrift_spec)), None, ), # 3 + ) + + def __init__(self, nodeType=None, roots=None, adjacencyList=None,): + self.nodeType = nodeType + self.roots = roots + self.adjacencyList = adjacencyList + + 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.nodeType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.roots = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in xrange(_size7): + _elem12 = iprot.readString(); + self.roots.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.adjacencyList = [] + (_etype16, _size13) = iprot.readListBegin() + for _i17 in xrange(_size13): + _elem18 = Adjacency() + _elem18.read(iprot) + self.adjacencyList.append(_elem18) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Graph') + if self.nodeType != None: + oprot.writeFieldBegin('nodeType', TType.I32, 1) + oprot.writeI32(self.nodeType) + oprot.writeFieldEnd() + if self.roots != None: + oprot.writeFieldBegin('roots', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.roots)) + for iter19 in self.roots: + oprot.writeString(iter19) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.adjacencyList != None: + oprot.writeFieldBegin('adjacencyList', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.adjacencyList)) + for iter20 in self.adjacencyList: + iter20.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Operator: + """ + Attributes: + - operatorId + - operatorType + - operatorAttributes + - operatorCounters + - done + - started + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'operatorId', None, None, ), # 1 + (2, TType.I32, 'operatorType', None, None, ), # 2 + (3, TType.MAP, 'operatorAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'operatorCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 + (5, TType.BOOL, 'done', None, None, ), # 5 + (6, TType.BOOL, 'started', None, None, ), # 6 + ) + + def __init__(self, operatorId=None, operatorType=None, operatorAttributes=None, operatorCounters=None, done=None, started=None,): + self.operatorId = operatorId + self.operatorType = operatorType + self.operatorAttributes = operatorAttributes + self.operatorCounters = operatorCounters + self.done = done + self.started = started + + 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.operatorId = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.operatorType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.operatorAttributes = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString(); + _val27 = iprot.readString(); + self.operatorAttributes[_key26] = _val27 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.operatorCounters = {} + (_ktype29, _vtype30, _size28 ) = iprot.readMapBegin() + for _i32 in xrange(_size28): + _key33 = iprot.readString(); + _val34 = iprot.readI64(); + self.operatorCounters[_key33] = _val34 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.done = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.started = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Operator') + if self.operatorId != None: + oprot.writeFieldBegin('operatorId', TType.STRING, 1) + oprot.writeString(self.operatorId) + oprot.writeFieldEnd() + if self.operatorType != None: + oprot.writeFieldBegin('operatorType', TType.I32, 2) + oprot.writeI32(self.operatorType) + oprot.writeFieldEnd() + if self.operatorAttributes != None: + oprot.writeFieldBegin('operatorAttributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.operatorAttributes)) + for kiter35,viter36 in self.operatorAttributes.items(): + oprot.writeString(kiter35) + oprot.writeString(viter36) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.operatorCounters != None: + oprot.writeFieldBegin('operatorCounters', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.I64, len(self.operatorCounters)) + for kiter37,viter38 in self.operatorCounters.items(): + oprot.writeString(kiter37) + oprot.writeI64(viter38) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.done != None: + oprot.writeFieldBegin('done', TType.BOOL, 5) + oprot.writeBool(self.done) + oprot.writeFieldEnd() + if self.started != None: + oprot.writeFieldBegin('started', TType.BOOL, 6) + oprot.writeBool(self.started) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Task: + """ + Attributes: + - taskId + - taskType + - taskAttributes + - taskCounters + - operatorGraph + - operatorList + - done + - started + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'taskId', None, None, ), # 1 + (2, TType.I32, 'taskType', None, None, ), # 2 + (3, TType.MAP, 'taskAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'taskCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 + (5, TType.STRUCT, 'operatorGraph', (Graph, Graph.thrift_spec), None, ), # 5 + (6, TType.LIST, 'operatorList', (TType.STRUCT,(Operator, Operator.thrift_spec)), None, ), # 6 + (7, TType.BOOL, 'done', None, None, ), # 7 + (8, TType.BOOL, 'started', None, None, ), # 8 + ) + + def __init__(self, taskId=None, taskType=None, taskAttributes=None, taskCounters=None, operatorGraph=None, operatorList=None, done=None, started=None,): + self.taskId = taskId + self.taskType = taskType + self.taskAttributes = taskAttributes + self.taskCounters = taskCounters + self.operatorGraph = operatorGraph + self.operatorList = operatorList + self.done = done + self.started = started + + 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.taskId = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.taskType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.taskAttributes = {} + (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin() + for _i43 in xrange(_size39): + _key44 = iprot.readString(); + _val45 = iprot.readString(); + self.taskAttributes[_key44] = _val45 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.taskCounters = {} + (_ktype47, _vtype48, _size46 ) = iprot.readMapBegin() + for _i50 in xrange(_size46): + _key51 = iprot.readString(); + _val52 = iprot.readI64(); + self.taskCounters[_key51] = _val52 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.operatorGraph = Graph() + self.operatorGraph.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.operatorList = [] + (_etype56, _size53) = iprot.readListBegin() + for _i57 in xrange(_size53): + _elem58 = Operator() + _elem58.read(iprot) + self.operatorList.append(_elem58) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.done = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.started = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Task') + if self.taskId != None: + oprot.writeFieldBegin('taskId', TType.STRING, 1) + oprot.writeString(self.taskId) + oprot.writeFieldEnd() + if self.taskType != None: + oprot.writeFieldBegin('taskType', TType.I32, 2) + oprot.writeI32(self.taskType) + oprot.writeFieldEnd() + if self.taskAttributes != None: + oprot.writeFieldBegin('taskAttributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.taskAttributes)) + for kiter59,viter60 in self.taskAttributes.items(): + oprot.writeString(kiter59) + oprot.writeString(viter60) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.taskCounters != None: + oprot.writeFieldBegin('taskCounters', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.I64, len(self.taskCounters)) + for kiter61,viter62 in self.taskCounters.items(): + oprot.writeString(kiter61) + oprot.writeI64(viter62) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.operatorGraph != None: + oprot.writeFieldBegin('operatorGraph', TType.STRUCT, 5) + self.operatorGraph.write(oprot) + oprot.writeFieldEnd() + if self.operatorList != None: + oprot.writeFieldBegin('operatorList', TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.operatorList)) + for iter63 in self.operatorList: + iter63.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.done != None: + oprot.writeFieldBegin('done', TType.BOOL, 7) + oprot.writeBool(self.done) + oprot.writeFieldEnd() + if self.started != None: + oprot.writeFieldBegin('started', TType.BOOL, 8) + oprot.writeBool(self.started) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Stage: + """ + Attributes: + - stageId + - stageType + - stageAttributes + - stageCounters + - taskList + - done + - started + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'stageId', None, None, ), # 1 + (2, TType.I32, 'stageType', None, None, ), # 2 + (3, TType.MAP, 'stageAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'stageCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 + (5, TType.LIST, 'taskList', (TType.STRUCT,(Task, Task.thrift_spec)), None, ), # 5 + (6, TType.BOOL, 'done', None, None, ), # 6 + (7, TType.BOOL, 'started', None, None, ), # 7 + ) + + def __init__(self, stageId=None, stageType=None, stageAttributes=None, stageCounters=None, taskList=None, done=None, started=None,): + self.stageId = stageId + self.stageType = stageType + self.stageAttributes = stageAttributes + self.stageCounters = stageCounters + self.taskList = taskList + self.done = done + self.started = started + + 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.stageId = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.stageType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.stageAttributes = {} + (_ktype65, _vtype66, _size64 ) = iprot.readMapBegin() + for _i68 in xrange(_size64): + _key69 = iprot.readString(); + _val70 = iprot.readString(); + self.stageAttributes[_key69] = _val70 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.stageCounters = {} + (_ktype72, _vtype73, _size71 ) = iprot.readMapBegin() + for _i75 in xrange(_size71): + _key76 = iprot.readString(); + _val77 = iprot.readI64(); + self.stageCounters[_key76] = _val77 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.taskList = [] + (_etype81, _size78) = iprot.readListBegin() + for _i82 in xrange(_size78): + _elem83 = Task() + _elem83.read(iprot) + self.taskList.append(_elem83) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.done = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.started = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Stage') + if self.stageId != None: + oprot.writeFieldBegin('stageId', TType.STRING, 1) + oprot.writeString(self.stageId) + oprot.writeFieldEnd() + if self.stageType != None: + oprot.writeFieldBegin('stageType', TType.I32, 2) + oprot.writeI32(self.stageType) + oprot.writeFieldEnd() + if self.stageAttributes != None: + oprot.writeFieldBegin('stageAttributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stageAttributes)) + for kiter84,viter85 in self.stageAttributes.items(): + oprot.writeString(kiter84) + oprot.writeString(viter85) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.stageCounters != None: + oprot.writeFieldBegin('stageCounters', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.I64, len(self.stageCounters)) + for kiter86,viter87 in self.stageCounters.items(): + oprot.writeString(kiter86) + oprot.writeI64(viter87) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.taskList != None: + oprot.writeFieldBegin('taskList', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.taskList)) + for iter88 in self.taskList: + iter88.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.done != None: + oprot.writeFieldBegin('done', TType.BOOL, 6) + oprot.writeBool(self.done) + oprot.writeFieldEnd() + if self.started != None: + oprot.writeFieldBegin('started', TType.BOOL, 7) + oprot.writeBool(self.started) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Query: + """ + Attributes: + - queryId + - queryType + - queryAttributes + - queryCounters + - stageGraph + - stageList + - done + - started + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'queryId', None, None, ), # 1 + (2, TType.STRING, 'queryType', None, None, ), # 2 + (3, TType.MAP, 'queryAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'queryCounters', (TType.STRING,None,TType.I64,None), None, ), # 4 + (5, TType.STRUCT, 'stageGraph', (Graph, Graph.thrift_spec), None, ), # 5 + (6, TType.LIST, 'stageList', (TType.STRUCT,(Stage, Stage.thrift_spec)), None, ), # 6 + (7, TType.BOOL, 'done', None, None, ), # 7 + (8, TType.BOOL, 'started', None, None, ), # 8 + ) + + def __init__(self, queryId=None, queryType=None, queryAttributes=None, queryCounters=None, stageGraph=None, stageList=None, done=None, started=None,): + self.queryId = queryId + self.queryType = queryType + self.queryAttributes = queryAttributes + self.queryCounters = queryCounters + self.stageGraph = stageGraph + self.stageList = stageList + self.done = done + self.started = started + + 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.queryId = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.queryType = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.queryAttributes = {} + (_ktype90, _vtype91, _size89 ) = iprot.readMapBegin() + for _i93 in xrange(_size89): + _key94 = iprot.readString(); + _val95 = iprot.readString(); + self.queryAttributes[_key94] = _val95 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.queryCounters = {} + (_ktype97, _vtype98, _size96 ) = iprot.readMapBegin() + for _i100 in xrange(_size96): + _key101 = iprot.readString(); + _val102 = iprot.readI64(); + self.queryCounters[_key101] = _val102 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.stageGraph = Graph() + self.stageGraph.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.stageList = [] + (_etype106, _size103) = iprot.readListBegin() + for _i107 in xrange(_size103): + _elem108 = Stage() + _elem108.read(iprot) + self.stageList.append(_elem108) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.done = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.started = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Query') + if self.queryId != None: + oprot.writeFieldBegin('queryId', TType.STRING, 1) + oprot.writeString(self.queryId) + oprot.writeFieldEnd() + if self.queryType != None: + oprot.writeFieldBegin('queryType', TType.STRING, 2) + oprot.writeString(self.queryType) + oprot.writeFieldEnd() + if self.queryAttributes != None: + oprot.writeFieldBegin('queryAttributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.queryAttributes)) + for kiter109,viter110 in self.queryAttributes.items(): + oprot.writeString(kiter109) + oprot.writeString(viter110) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.queryCounters != None: + oprot.writeFieldBegin('queryCounters', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.I64, len(self.queryCounters)) + for kiter111,viter112 in self.queryCounters.items(): + oprot.writeString(kiter111) + oprot.writeI64(viter112) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.stageGraph != None: + oprot.writeFieldBegin('stageGraph', TType.STRUCT, 5) + self.stageGraph.write(oprot) + oprot.writeFieldEnd() + if self.stageList != None: + oprot.writeFieldBegin('stageList', TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.stageList)) + for iter113 in self.stageList: + iter113.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.done != None: + oprot.writeFieldBegin('done', TType.BOOL, 7) + oprot.writeBool(self.done) + oprot.writeFieldEnd() + if self.started != None: + oprot.writeFieldBegin('started', TType.BOOL, 8) + oprot.writeBool(self.started) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class QueryPlan: + """ + Attributes: + - queries + - done + - started + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'queries', (TType.STRUCT,(Query, Query.thrift_spec)), None, ), # 1 + (2, TType.BOOL, 'done', None, None, ), # 2 + (3, TType.BOOL, 'started', None, None, ), # 3 + ) + + def __init__(self, queries=None, done=None, started=None,): + self.queries = queries + self.done = done + self.started = started + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.queries = [] + (_etype117, _size114) = iprot.readListBegin() + for _i118 in xrange(_size114): + _elem119 = Query() + _elem119.read(iprot) + self.queries.append(_elem119) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.done = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.started = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('QueryPlan') + if self.queries != None: + oprot.writeFieldBegin('queries', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.queries)) + for iter120 in self.queries: + iter120.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.done != None: + oprot.writeFieldBegin('done', TType.BOOL, 2) + oprot.writeBool(self.done) + oprot.writeFieldEnd() + if self.started != None: + oprot.writeFieldBegin('started', TType.BOOL, 3) + oprot.writeBool(self.started) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git ql/src/gen/thrift/gen-rb/queryplan_constants.rb ql/src/gen/thrift/gen-rb/queryplan_constants.rb new file mode 100644 index 0000000..e2856ca --- /dev/null +++ ql/src/gen/thrift/gen-rb/queryplan_constants.rb @@ -0,0 +1,8 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'queryplan_types' + diff --git ql/src/gen/thrift/gen-rb/queryplan_types.rb ql/src/gen/thrift/gen-rb/queryplan_types.rb new file mode 100644 index 0000000..e6a2a58 --- /dev/null +++ ql/src/gen/thrift/gen-rb/queryplan_types.rb @@ -0,0 +1,256 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + + +module AdjacencyType + CONJUNCTIVE = 0 + DISJUNCTIVE = 1 + VALUE_MAP = {0 => "CONJUNCTIVE", 1 => "DISJUNCTIVE"} + VALID_VALUES = Set.new([CONJUNCTIVE, DISJUNCTIVE]).freeze +end + +module NodeType + OPERATOR = 0 + STAGE = 1 + VALUE_MAP = {0 => "OPERATOR", 1 => "STAGE"} + VALID_VALUES = Set.new([OPERATOR, STAGE]).freeze +end + +module OperatorType + JOIN = 0 + MAPJOIN = 1 + EXTRACT = 2 + FILTER = 3 + FORWARD = 4 + GROUPBY = 5 + LIMIT = 6 + SCRIPT = 7 + SELECT = 8 + TABLESCAN = 9 + FILESINK = 10 + REDUCESINK = 11 + UNION = 12 + UDTF = 13 + LATERALVIEWJOIN = 14 + LATERALVIEWFORWARD = 15 + HASHTABLESINK = 16 + HASHTABLEDUMMY = 17 + VALUE_MAP = {0 => "JOIN", 1 => "MAPJOIN", 2 => "EXTRACT", 3 => "FILTER", 4 => "FORWARD", 5 => "GROUPBY", 6 => "LIMIT", 7 => "SCRIPT", 8 => "SELECT", 9 => "TABLESCAN", 10 => "FILESINK", 11 => "REDUCESINK", 12 => "UNION", 13 => "UDTF", 14 => "LATERALVIEWJOIN", 15 => "LATERALVIEWFORWARD", 16 => "HASHTABLESINK", 17 => "HASHTABLEDUMMY"} + VALID_VALUES = Set.new([JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD, HASHTABLESINK, HASHTABLEDUMMY]).freeze +end + +module TaskType + MAP = 0 + REDUCE = 1 + OTHER = 2 + VALUE_MAP = {0 => "MAP", 1 => "REDUCE", 2 => "OTHER"} + VALID_VALUES = Set.new([MAP, REDUCE, OTHER]).freeze +end + +module StageType + CONDITIONAL = 0 + COPY = 1 + DDL = 2 + MAPRED = 3 + EXPLAIN = 4 + FETCH = 5 + FUNC = 6 + MAPREDLOCAL = 7 + MOVE = 8 + STATS = 9 + VALUE_MAP = {0 => "CONDITIONAL", 1 => "COPY", 2 => "DDL", 3 => "MAPRED", 4 => "EXPLAIN", 5 => "FETCH", 6 => "FUNC", 7 => "MAPREDLOCAL", 8 => "MOVE", 9 => "STATS"} + VALID_VALUES = Set.new([CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE, STATS]).freeze +end + +class Adjacency + include ::Thrift::Struct, ::Thrift::Struct_Union + NODE = 1 + CHILDREN = 2 + ADJACENCYTYPE = 3 + + FIELDS = { + NODE => {:type => ::Thrift::Types::STRING, :name => 'node'}, + CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}}, + ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType} + } + + def struct_fields; FIELDS; end + + def validate + unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Graph + include ::Thrift::Struct, ::Thrift::Struct_Union + NODETYPE = 1 + ROOTS = 2 + ADJACENCYLIST = 3 + + FIELDS = { + NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType}, + ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}}, + ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}} + } + + def struct_fields; FIELDS; end + + def validate + unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Operator + include ::Thrift::Struct, ::Thrift::Struct_Union + OPERATORID = 1 + OPERATORTYPE = 2 + OPERATORATTRIBUTES = 3 + OPERATORCOUNTERS = 4 + DONE = 5 + STARTED = 6 + + FIELDS = { + OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'}, + OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType}, + OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Task + include ::Thrift::Struct, ::Thrift::Struct_Union + TASKID = 1 + TASKTYPE = 2 + TASKATTRIBUTES = 3 + TASKCOUNTERS = 4 + OPERATORGRAPH = 5 + OPERATORLIST = 6 + DONE = 7 + STARTED = 8 + + FIELDS = { + TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'}, + TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType}, + TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true}, + OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Stage + include ::Thrift::Struct, ::Thrift::Struct_Union + STAGEID = 1 + STAGETYPE = 2 + STAGEATTRIBUTES = 3 + STAGECOUNTERS = 4 + TASKLIST = 5 + DONE = 6 + STARTED = 7 + + FIELDS = { + STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'}, + STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType}, + STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Query + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERYID = 1 + QUERYTYPE = 2 + QUERYATTRIBUTES = 3 + QUERYCOUNTERS = 4 + STAGEGRAPH = 5 + STAGELIST = 6 + DONE = 7 + STARTED = 8 + + FIELDS = { + QUERYID => {:type => ::Thrift::Types::STRING, :name => 'queryId'}, + QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'}, + QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph}, + STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class QueryPlan + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERIES = 1 + DONE = 2 + STARTED = 3 + + FIELDS = { + QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java index 5ccb909..52d14ae 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java @@ -132,7 +132,7 @@ public abstract class AbstractMapJoinOperator extends Co } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java index 7daea2d..aa45b7d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.CollectDesc; import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -78,7 +79,7 @@ public class CollectOperator extends Operator implements } @Override - public int getType() { - return -1; + public OperatorType getType() { + return null; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java index bf7b7a5..90589ed 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java @@ -172,7 +172,7 @@ public class ConditionalTask extends Task implements Serializab } @Override - public int getType() { + public StageType getType() { return StageType.CONDITIONAL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java index 46b8bf4..30ea670 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java @@ -90,7 +90,7 @@ public class CopyTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.COPY; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index aa3c189..0d1bdfd 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -2688,7 +2688,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 49e708c..622cee8 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java @@ -1269,7 +1269,7 @@ public class ExecDriver extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.MAPRED; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java index a572bcb..9e0d48e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java @@ -407,7 +407,7 @@ public class ExplainTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.EXPLAIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java index 7bf8886..5257463 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java @@ -46,7 +46,7 @@ public class ExtractOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.EXTRACT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java index de2c42d..5987a3c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java @@ -151,7 +151,7 @@ public class FetchTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.FETCH; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java index d510f95..ba1a9b1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java @@ -759,7 +759,7 @@ public class FileSinkOperator extends TerminalOperator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FILESINK; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java index 554bf25..44e0e31 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java @@ -108,7 +108,7 @@ public class FilterOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FILTER; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java index 2a35c96..4c15f69 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java @@ -37,7 +37,7 @@ public class ForwardOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FORWARD; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java index 1e6941e..225c5c7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java @@ -120,7 +120,7 @@ public class FunctionTask extends Task { } @Override - public int getType() { + public StageType getType() { return StageType.FUNC; } @@ -133,4 +133,4 @@ public class FunctionTask extends Task { protected void localizeMRTmpFilesImpl(Context ctx) { throw new RuntimeException ("Unexpected call"); } -} \ No newline at end of file +} diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java index 8423178..e5de8d1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java @@ -1039,7 +1039,7 @@ public class GroupByOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.GROUPBY; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java index 87fc61c..57ae5fc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java @@ -58,7 +58,7 @@ public class HashTableDummyOperator extends Operator impleme } @Override - public int getType() { + public OperatorType getType() { return OperatorType.HASHTABLEDUMMY; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java index 4cf055f..43749d4 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java @@ -442,10 +442,7 @@ public class HashTableSinkOperator extends TerminalOperator i } @Override - public int getType() { + public OperatorType getType() { return OperatorType.HASHTABLESINK; } - - - } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java index e16df36..b9714cc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java @@ -133,7 +133,7 @@ public class JoinOperator extends CommonJoinOperator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.JOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java index c070aca..5bfb805 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java @@ -43,7 +43,7 @@ public class LateralViewForwardOperator extends Operator } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LATERALVIEWFORWARD; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java index 5eb9098..f5c42ef 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java @@ -143,7 +143,7 @@ public class LateralViewJoinOperator extends Operator { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LATERALVIEWJOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java index da5dbb9..b1958a5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java @@ -57,7 +57,7 @@ public class LimitOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LIMIT; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java index c9f99ac..dd7c723 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java @@ -297,7 +297,7 @@ public class MapJoinOperator extends AbstractMapJoinOperator implem } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java index 887ad30..3b7d5c1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java @@ -34,6 +34,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.io.IOContext; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.VirtualColumn; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.MapredWork; import org.apache.hadoop.hive.ql.plan.PartitionDesc; import org.apache.hadoop.hive.ql.plan.TableScanDesc; @@ -519,8 +520,8 @@ public class MapOperator extends Operator implements Serializable { } @Override - public int getType() { - return -1; + public OperatorType getType() { + return null; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java index 0fab63c..83bbc1c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java @@ -409,7 +409,4 @@ public class MapRedTask extends ExecDriver implements Serializable { return null; } - - - } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java index 2bb7ec5..ff5f010 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java @@ -451,8 +451,8 @@ public class MapredLocalTask extends Task implements Serializab } @Override - public int getType() { - // assert false; + public StageType getType() { + //assert false; return StageType.MAPREDLOCAL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 7fbc586..d19b1db 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -283,7 +283,7 @@ public class MoveTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.MOVE; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java index 6c6ea89..dc3ea1e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java @@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.Explain; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -1204,7 +1205,7 @@ public abstract class Operator implements Serializable, * * @return OperatorType.* */ - abstract public int getType(); + abstract public OperatorType getType(); public void setGroupKeyObject(Object keyObject) { this.groupKeyObject = keyObject; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java index 592f4f7..2685820 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java @@ -314,7 +314,7 @@ public class ReduceSinkOperator extends TerminalOperator } @Override - public int getType() { + public OperatorType getType() { return OperatorType.REDUCESINK; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java index 001d1f0..9c52deb 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java @@ -588,7 +588,7 @@ public class SMBMapJoinOperator extends AbstractMapJoinOperator imp } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java index 4f8b4bd..aec5fca 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java @@ -662,7 +662,7 @@ public class ScriptOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.SCRIPT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java index d644a33..3582e78 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java @@ -93,7 +93,7 @@ public class SelectOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.SELECT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java index 47adbed..b818dc5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java @@ -211,7 +211,7 @@ public class StatsTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.STATS; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java index 96e63b8..6ba7a9d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java @@ -181,7 +181,7 @@ public class TableScanOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.TABLESCAN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java index 95d90e6..d8636d8 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java @@ -34,6 +34,7 @@ import org.apache.hadoop.hive.ql.QueryPlan; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.api.StageType; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState.LogHelper; import org.apache.hadoop.util.StringUtils; @@ -351,14 +352,11 @@ public abstract class Task implements Serializable, Node } /** - * Should be overridden to return the type of the specific task among the types in TaskType. + * Should be overridden to return the type of the specific task among the types in StageType. * - * @return TaskTypeType.* or -1 if not overridden + * @return StageType.* or null if not overridden */ - public int getType() { - assert false; - return -1; - } + public abstract StageType getType(); /** * If this task uses any map-reduce intermediate data (either for reading or for writing), diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java index 682f38a..919656c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java @@ -118,7 +118,7 @@ public class UDTFOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.UDTF; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java index 2c42ed7..2462517 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java @@ -141,7 +141,7 @@ public class UnionOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.UNION; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java index 0d60507..1f01446 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java @@ -57,7 +57,7 @@ public class CompactIndexHandler extends AbstractIndexHandler { Table indexTable) throws HiveException { StorageDescriptor storageDesc = index.getSd(); if (this.usesIndexTable() && indexTable != null) { - StorageDescriptor indexTableSd = storageDesc.clone(); + StorageDescriptor indexTableSd = storageDesc.deepCopy(); List indexTblCols = indexTableSd.getCols(); FieldSchema bucketFileName = new FieldSchema("_bucketname", "string", ""); indexTblCols.add(bucketFileName); diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java index 734bd72..eac168f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java @@ -96,7 +96,7 @@ public class IndexMetadataChangeTask extends Task{ } @Override - public int getType() { + public StageType getType() { return StageType.DDL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index 5d33550..9780fea 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -514,7 +514,7 @@ public class Hive { } } - org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().clone(); + org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().deepCopy(); SerDeInfo serdeInfo = storageDescriptor.getSerdeInfo(); if(serde != null) { serdeInfo.setSerializationLib(serde); diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java index 33991f3..5a63196 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java @@ -730,7 +730,7 @@ public class Table implements Serializable { } public Table copy() throws HiveException { - return new Table(tTable.clone()); + return new Table(tTable.deepCopy()); } public void setCreateTime(int createTime) { diff --git serde/build.xml serde/build.xml index b64b142..51ac8dd 100644 --- serde/build.xml +++ serde/build.xml @@ -30,7 +30,6 @@ to call at top-level: ant deploy-contrib compile-core-test - - + @@ -56,18 +55,19 @@ to call at top-level: ant deploy-contrib compile-core-test - - Executing thrift (which needs to be in your path) to build java serde Constants... - - + + You must set the 'thrift.home' property! + Executing ${thrift.home}/bin/thrift to build java serde Constants... + + - Executing thrift (which needs to be in your path) to build complex.thrift test classes... - - + Executing ${thrift.home}/bin/thrift to build complex.thrift test classes... + + - Executing thrift (which needs to be in your path) to build testthrift.thrift classes... - - + Executing ${thrift.home}/bin/thrift to build testthrift.thrift classes... + + diff --git serde/ivy.xml serde/ivy.xml index da69342..2b38da4 100644 --- serde/ivy.xml +++ serde/ivy.xml @@ -1,8 +1,26 @@ + - + + + diff --git serde/src/gen-cpp/serde_constants.cpp serde/src/gen-cpp/serde_constants.cpp deleted file mode 100644 index 52811cf..0000000 --- serde/src/gen-cpp/serde_constants.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "serde_constants.h" - -namespace Hive { - -const serdeConstants g_serde_constants; - -serdeConstants::serdeConstants() { - SERIALIZATION_LIB = "serialization.lib"; - - SERIALIZATION_CLASS = "serialization.class"; - - SERIALIZATION_FORMAT = "serialization.format"; - - SERIALIZATION_DDL = "serialization.ddl"; - - SERIALIZATION_NULL_FORMAT = "serialization.null.format"; - - SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; - - SERIALIZATION_SORT_ORDER = "serialization.sort.order"; - - SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; - - FIELD_DELIM = "field.delim"; - - COLLECTION_DELIM = "colelction.delim"; - - LINE_DELIM = "line.delim"; - - MAPKEY_DELIM = "mapkey.delim"; - - QUOTE_CHAR = "quote.delim"; - - ESCAPE_CHAR = "escape.delim"; - - VOID_TYPE_NAME = "void"; - - BOOLEAN_TYPE_NAME = "boolean"; - - TINYINT_TYPE_NAME = "tinyint"; - - SMALLINT_TYPE_NAME = "smallint"; - - INT_TYPE_NAME = "int"; - - BIGINT_TYPE_NAME = "bigint"; - - FLOAT_TYPE_NAME = "float"; - - DOUBLE_TYPE_NAME = "double"; - - STRING_TYPE_NAME = "string"; - - DATE_TYPE_NAME = "date"; - - DATETIME_TYPE_NAME = "datetime"; - - TIMESTAMP_TYPE_NAME = "timestamp"; - - LIST_TYPE_NAME = "array"; - - MAP_TYPE_NAME = "map"; - - STRUCT_TYPE_NAME = "struct"; - - UNION_TYPE_NAME = "uniontype"; - - LIST_COLUMNS = "columns"; - - LIST_COLUMN_TYPES = "columns.types"; - - PrimitiveTypes.insert("void"); - PrimitiveTypes.insert("boolean"); - PrimitiveTypes.insert("tinyint"); - PrimitiveTypes.insert("smallint"); - PrimitiveTypes.insert("int"); - PrimitiveTypes.insert("bigint"); - PrimitiveTypes.insert("float"); - PrimitiveTypes.insert("double"); - PrimitiveTypes.insert("string"); - PrimitiveTypes.insert("date"); - PrimitiveTypes.insert("datetime"); - PrimitiveTypes.insert("timestamp"); - - CollectionTypes.insert("array"); - CollectionTypes.insert("map"); - -} - -} // namespace - diff --git serde/src/gen-cpp/serde_constants.h serde/src/gen-cpp/serde_constants.h deleted file mode 100644 index b7a67ba..0000000 --- serde/src/gen-cpp/serde_constants.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef serde_CONSTANTS_H -#define serde_CONSTANTS_H - -#include "serde_types.h" - -namespace Hive { - -class serdeConstants { - public: - serdeConstants(); - - std::string SERIALIZATION_LIB; - std::string SERIALIZATION_CLASS; - std::string SERIALIZATION_FORMAT; - std::string SERIALIZATION_DDL; - 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; - std::string MAPKEY_DELIM; - std::string QUOTE_CHAR; - std::string ESCAPE_CHAR; - std::string VOID_TYPE_NAME; - std::string BOOLEAN_TYPE_NAME; - std::string TINYINT_TYPE_NAME; - std::string SMALLINT_TYPE_NAME; - std::string INT_TYPE_NAME; - std::string BIGINT_TYPE_NAME; - std::string FLOAT_TYPE_NAME; - std::string DOUBLE_TYPE_NAME; - std::string STRING_TYPE_NAME; - std::string DATE_TYPE_NAME; - std::string DATETIME_TYPE_NAME; - std::string TIMESTAMP_TYPE_NAME; - std::string LIST_TYPE_NAME; - std::string MAP_TYPE_NAME; - std::string STRUCT_TYPE_NAME; - std::string UNION_TYPE_NAME; - std::string LIST_COLUMNS; - std::string LIST_COLUMN_TYPES; - std::set PrimitiveTypes; - std::set CollectionTypes; -}; - -extern const serdeConstants g_serde_constants; - -} // namespace - -#endif diff --git serde/src/gen-cpp/serde_types.cpp serde/src/gen-cpp/serde_types.cpp deleted file mode 100644 index 826f2bb..0000000 --- serde/src/gen-cpp/serde_types.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "serde_types.h" - -namespace Hive { - -} // namespace diff --git serde/src/gen-cpp/serde_types.h serde/src/gen-cpp/serde_types.h deleted file mode 100644 index 8a9d46c..0000000 --- serde/src/gen-cpp/serde_types.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef serde_TYPES_H -#define serde_TYPES_H - -#include -#include -#include -#include - - - -namespace Hive { - -typedef std::string PrimitiveType; - -typedef std::string CollectionType; - -} // namespace - -#endif diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java deleted file mode 100644 index d52c0ad..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -public class Constants { - - public static final String SERIALIZATION_LIB = "serialization.lib"; - - public static final String SERIALIZATION_CLASS = "serialization.class"; - - public static final String SERIALIZATION_FORMAT = "serialization.format"; - - public static final String SERIALIZATION_DDL = "serialization.ddl"; - - public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; - - public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; - - public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; - - public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; - - public static final String FIELD_DELIM = "field.delim"; - - public static final String COLLECTION_DELIM = "colelction.delim"; - - public static final String LINE_DELIM = "line.delim"; - - public static final String MAPKEY_DELIM = "mapkey.delim"; - - public static final String QUOTE_CHAR = "quote.delim"; - - public static final String ESCAPE_CHAR = "escape.delim"; - - public static final String VOID_TYPE_NAME = "void"; - - public static final String BOOLEAN_TYPE_NAME = "boolean"; - - public static final String TINYINT_TYPE_NAME = "tinyint"; - - public static final String SMALLINT_TYPE_NAME = "smallint"; - - public static final String INT_TYPE_NAME = "int"; - - public static final String BIGINT_TYPE_NAME = "bigint"; - - public static final String FLOAT_TYPE_NAME = "float"; - - public static final String DOUBLE_TYPE_NAME = "double"; - - public static final String STRING_TYPE_NAME = "string"; - - public static final String DATE_TYPE_NAME = "date"; - - public static final String DATETIME_TYPE_NAME = "datetime"; - - public static final String TIMESTAMP_TYPE_NAME = "timestamp"; - - public static final String LIST_TYPE_NAME = "array"; - - public static final String MAP_TYPE_NAME = "map"; - - public static final String STRUCT_TYPE_NAME = "struct"; - - public static final String UNION_TYPE_NAME = "uniontype"; - - public static final String LIST_COLUMNS = "columns"; - - public static final String LIST_COLUMN_TYPES = "columns.types"; - - public static final Set PrimitiveTypes = new HashSet(); - static { - PrimitiveTypes.add("void"); - PrimitiveTypes.add("boolean"); - PrimitiveTypes.add("tinyint"); - PrimitiveTypes.add("smallint"); - PrimitiveTypes.add("int"); - PrimitiveTypes.add("bigint"); - PrimitiveTypes.add("float"); - PrimitiveTypes.add("double"); - PrimitiveTypes.add("string"); - PrimitiveTypes.add("date"); - PrimitiveTypes.add("datetime"); - PrimitiveTypes.add("timestamp"); - } - - public static final Set CollectionTypes = new HashSet(); - static { - CollectionTypes.add("array"); - CollectionTypes.add("map"); - } - -} diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/Constants.java deleted file mode 100644 index e69de29..0000000 diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java deleted file mode 100644 index 325f30a..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class InnerStruct implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("InnerStruct"); - private static final TField FIELD0_FIELD_DESC = new TField("field0", TType.I32, (short)1); - - public int field0; - public static final int FIELD0 = 1; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean field0 = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD0, new FieldMetaData("field0", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); - } - - public InnerStruct() { - } - - public InnerStruct( - int field0) - { - this(); - this.field0 = field0; - this.__isset.field0 = true; - } - - /** - * Performs a deep copy on other. - */ - public InnerStruct(InnerStruct other) { - __isset.field0 = other.__isset.field0; - this.field0 = other.field0; - } - - @Override - public InnerStruct clone() { - return new InnerStruct(this); - } - - public int getField0() { - return this.field0; - } - - public void setField0(int field0) { - this.field0 = field0; - this.__isset.field0 = true; - } - - public void unsetField0() { - this.__isset.field0 = false; - } - - // Returns true if field field0 is set (has been asigned a value) and false otherwise - public boolean isSetField0() { - return this.__isset.field0; - } - - public void setField0IsSet(boolean value) { - this.__isset.field0 = value; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case FIELD0: - if (value == null) { - unsetField0(); - } else { - setField0((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELD0: - return new Integer(getField0()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELD0: - return isSetField0(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InnerStruct) - return this.equals((InnerStruct)that); - return false; - } - - public boolean equals(InnerStruct that) { - if (that == null) - return false; - - boolean this_present_field0 = true; - boolean that_present_field0 = true; - if (this_present_field0 || that_present_field0) { - if (!(this_present_field0 && that_present_field0)) - return false; - if (this.field0 != that.field0) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case FIELD0: - if (field.type == TType.I32) { - this.field0 = iprot.readI32(); - this.__isset.field0 = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD0_FIELD_DESC); - oprot.writeI32(this.field0); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("InnerStruct("); - boolean first = true; - - sb.append("field0:"); - sb.append(this.field0); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java deleted file mode 100644 index 3f4efbe..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java +++ /dev/null @@ -1,401 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ThriftTestObj"); - private static final TField FIELD1_FIELD_DESC = new TField("field1", TType.I32, (short)1); - private static final TField FIELD2_FIELD_DESC = new TField("field2", TType.STRING, (short)2); - private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.LIST, (short)3); - - public int field1; - public static final int FIELD1 = 1; - public String field2; - public static final int FIELD2 = 2; - public List field3; - public static final int FIELD3 = 3; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean field1 = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, InnerStruct.class)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); - } - - public ThriftTestObj() { - } - - public ThriftTestObj( - int field1, - String field2, - List field3) - { - this(); - this.field1 = field1; - this.__isset.field1 = true; - this.field2 = field2; - this.field3 = field3; - } - - /** - * Performs a deep copy on other. - */ - public ThriftTestObj(ThriftTestObj other) { - __isset.field1 = other.__isset.field1; - this.field1 = other.field1; - if (other.isSetField2()) { - this.field2 = other.field2; - } - if (other.isSetField3()) { - List __this__field3 = new ArrayList(); - for (InnerStruct other_element : other.field3) { - __this__field3.add(new InnerStruct(other_element)); - } - this.field3 = __this__field3; - } - } - - @Override - public ThriftTestObj clone() { - return new ThriftTestObj(this); - } - - public int getField1() { - return this.field1; - } - - public void setField1(int field1) { - this.field1 = field1; - this.__isset.field1 = true; - } - - public void unsetField1() { - this.__isset.field1 = false; - } - - // Returns true if field field1 is set (has been asigned a value) and false otherwise - public boolean isSetField1() { - return this.__isset.field1; - } - - public void setField1IsSet(boolean value) { - this.__isset.field1 = value; - } - - public String getField2() { - return this.field2; - } - - public void setField2(String field2) { - this.field2 = field2; - } - - public void unsetField2() { - this.field2 = null; - } - - // Returns true if field field2 is set (has been asigned a value) and false otherwise - public boolean isSetField2() { - return this.field2 != null; - } - - public void setField2IsSet(boolean value) { - if (!value) { - this.field2 = null; - } - } - - public int getField3Size() { - return (this.field3 == null) ? 0 : this.field3.size(); - } - - public java.util.Iterator getField3Iterator() { - return (this.field3 == null) ? null : this.field3.iterator(); - } - - public void addToField3(InnerStruct elem) { - if (this.field3 == null) { - this.field3 = new ArrayList(); - } - this.field3.add(elem); - } - - public List getField3() { - return this.field3; - } - - public void setField3(List field3) { - this.field3 = field3; - } - - public void unsetField3() { - this.field3 = null; - } - - // Returns true if field field3 is set (has been asigned a value) and false otherwise - public boolean isSetField3() { - return this.field3 != null; - } - - public void setField3IsSet(boolean value) { - if (!value) { - this.field3 = null; - } - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case FIELD1: - if (value == null) { - unsetField1(); - } else { - setField1((Integer)value); - } - break; - - case FIELD2: - if (value == null) { - unsetField2(); - } else { - setField2((String)value); - } - break; - - case FIELD3: - if (value == null) { - unsetField3(); - } else { - setField3((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELD1: - return new Integer(getField1()); - - case FIELD2: - return getField2(); - - case FIELD3: - return getField3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELD1: - return isSetField1(); - case FIELD2: - return isSetField2(); - case FIELD3: - return isSetField3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ThriftTestObj) - return this.equals((ThriftTestObj)that); - return false; - } - - public boolean equals(ThriftTestObj that) { - if (that == null) - return false; - - boolean this_present_field1 = true; - boolean that_present_field1 = true; - if (this_present_field1 || that_present_field1) { - if (!(this_present_field1 && that_present_field1)) - return false; - if (this.field1 != that.field1) - return false; - } - - boolean this_present_field2 = true && this.isSetField2(); - boolean that_present_field2 = true && that.isSetField2(); - if (this_present_field2 || that_present_field2) { - if (!(this_present_field2 && that_present_field2)) - return false; - if (!this.field2.equals(that.field2)) - return false; - } - - boolean this_present_field3 = true && this.isSetField3(); - boolean that_present_field3 = true && that.isSetField3(); - if (this_present_field3 || that_present_field3) { - if (!(this_present_field3 && that_present_field3)) - return false; - if (!this.field3.equals(that.field3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case FIELD1: - if (field.type == TType.I32) { - this.field1 = iprot.readI32(); - this.__isset.field1 = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FIELD2: - if (field.type == TType.STRING) { - this.field2 = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FIELD3: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.field3 = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - InnerStruct _elem2; - _elem2 = new InnerStruct(); - _elem2.read(iprot); - this.field3.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD1_FIELD_DESC); - oprot.writeI32(this.field1); - oprot.writeFieldEnd(); - if (this.field2 != null) { - oprot.writeFieldBegin(FIELD2_FIELD_DESC); - oprot.writeString(this.field2); - oprot.writeFieldEnd(); - } - if (this.field3 != null) { - oprot.writeFieldBegin(FIELD3_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); - for (InnerStruct _iter3 : this.field3) { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ThriftTestObj("); - boolean first = true; - - sb.append("field1:"); - sb.append(this.field1); - first = false; - if (!first) sb.append(", "); - sb.append("field2:"); - if (this.field2 == null) { - sb.append("null"); - } else { - sb.append(this.field2); - } - first = false; - if (!first) sb.append(", "); - sb.append("field3:"); - if (this.field3 == null) { - sb.append("null"); - } else { - sb.append(this.field3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java serde/src/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java deleted file mode 100644 index 2fddbfb..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: complexpb.proto - -package org.apache.hadoop.hive.serde2.proto.test; - -public final class Complexpb { - private Complexpb() {} - - public static final class IntString { - public IntString(int myInt, String myString, int underscoreInt) { - this.myint_ = myInt; - this.hasMyint = true; - this.myString_ = myString; - this.hasMyString = true; - this.underscoreInt_ = underscoreInt; - this.hasUnderscoreInt = true; - } - - // optional int32 myint = 1; - public static final int MYINT_FIELD_NUMBER = 1; - private final boolean hasMyint; - private int myint_ = 0; - public boolean hasMyint() { return hasMyint; } - public int getMyint() { return myint_; } - - // optional string myString = 2; - public static final int MYSTRING_FIELD_NUMBER = 2; - private final boolean hasMyString; - private java.lang.String myString_ = ""; - public boolean hasMyString() { return hasMyString; } - public java.lang.String getMyString() { return myString_; } - - // optional int32 underscore_int = 3; - public static final int UNDERSCORE_INT_FIELD_NUMBER = 3; - private final boolean hasUnderscoreInt; - private int underscoreInt_ = 0; - public boolean hasUnderscoreInt() { return hasUnderscoreInt; } - public int getUnderscoreInt() { return underscoreInt_; } - - public final boolean isInitialized() { - return true; - } - - } - - public static final class Complex { - // Use Complex.newBuilder() to construct. - public Complex(int aint, String aString, java.util.List lint, java.util.List lString, java.util.List lintString) { - this.aint_ = aint; - this.hasAint = true; - this.aString_ = aString; - this.hasAString = true; - this.lint_ = lint; - this.lString_ = lString; - this.lintString_ = lintString; - } - - // optional int32 aint = 1; - public static final int AINT_FIELD_NUMBER = 1; - private final boolean hasAint; - private int aint_ = 0; - public boolean hasAint() { return hasAint; } - public int getAint() { return aint_; } - - // optional string aString = 2; - public static final int ASTRING_FIELD_NUMBER = 2; - private final boolean hasAString; - private java.lang.String aString_ = ""; - public boolean hasAString() { return hasAString; } - public java.lang.String getAString() { return aString_; } - - // repeated int32 lint = 3; - public static final int LINT_FIELD_NUMBER = 3; - private java.util.List lint_ = - java.util.Collections.emptyList(); - public java.util.List getLintList() { - return lint_; - } - public int getLintCount() { return lint_.size(); } - public int getLint(int index) { - return lint_.get(index); - } - - // repeated string lString = 4; - public static final int LSTRING_FIELD_NUMBER = 4; - private java.util.List lString_ = - java.util.Collections.emptyList(); - public java.util.List getLStringList() { - return lString_; - } - public int getLStringCount() { return lString_.size(); } - public java.lang.String getLString(int index) { - return lString_.get(index); - } - - // repeated .org.apache.hadoop.hive.serde2.proto.test.IntString lintString = 5; - public static final int LINTSTRING_FIELD_NUMBER = 5; - private java.util.List lintString_ = - java.util.Collections.emptyList(); - public java.util.List getLintStringList() { - return lintString_; - } - public int getLintStringCount() { return lintString_.size(); } - public org.apache.hadoop.hive.serde2.proto.test.Complexpb.IntString getLintString(int index) { - return lintString_.get(index); - } - - private void initFields() { - } - public final boolean isInitialized() { - return true; - } - - // @@protoc_insertion_point(class_scope:org.apache.hadoop.hive.serde2.proto.test.Complex) - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java deleted file mode 100644 index ece9305..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java +++ /dev/null @@ -1,742 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class Complex implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("Complex"); - private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1); - private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2); - private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3); - private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4); - private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5); - private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6); - - public int aint; - public static final int AINT = 1; - public String aString; - public static final int ASTRING = 2; - public List lint; - public static final int LINT = 3; - public List lString; - public static final int LSTRING = 4; - public List lintString; - public static final int LINTSTRING = 5; - public Map mStringString; - public static final int MSTRINGSTRING = 6; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean aint = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(ASTRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.I32)))); - put(LSTRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(LINTSTRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, IntString.class)))); - put(MSTRINGSTRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); - } - - public Complex() { - } - - public Complex( - int aint, - String aString, - List lint, - List lString, - List lintString, - Map mStringString) - { - this(); - this.aint = aint; - this.__isset.aint = true; - this.aString = aString; - this.lint = lint; - this.lString = lString; - this.lintString = lintString; - this.mStringString = mStringString; - } - - /** - * Performs a deep copy on other. - */ - public Complex(Complex other) { - __isset.aint = other.__isset.aint; - this.aint = other.aint; - if (other.isSetAString()) { - this.aString = other.aString; - } - if (other.isSetLint()) { - List __this__lint = new ArrayList(); - for (Integer other_element : other.lint) { - __this__lint.add(other_element); - } - this.lint = __this__lint; - } - if (other.isSetLString()) { - List __this__lString = new ArrayList(); - for (String other_element : other.lString) { - __this__lString.add(other_element); - } - this.lString = __this__lString; - } - if (other.isSetLintString()) { - List __this__lintString = new ArrayList(); - for (IntString other_element : other.lintString) { - __this__lintString.add(new IntString(other_element)); - } - this.lintString = __this__lintString; - } - if (other.isSetMStringString()) { - Map __this__mStringString = new HashMap(); - for (Map.Entry other_element : other.mStringString.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__mStringString_copy_key = other_element_key; - - String __this__mStringString_copy_value = other_element_value; - - __this__mStringString.put(__this__mStringString_copy_key, __this__mStringString_copy_value); - } - this.mStringString = __this__mStringString; - } - } - - @Override - public Complex clone() { - return new Complex(this); - } - - public int getAint() { - return this.aint; - } - - public void setAint(int aint) { - this.aint = aint; - this.__isset.aint = true; - } - - public void unsetAint() { - this.__isset.aint = false; - } - - // Returns true if field aint is set (has been asigned a value) and false otherwise - public boolean isSetAint() { - return this.__isset.aint; - } - - public void setAintIsSet(boolean value) { - this.__isset.aint = value; - } - - public String getAString() { - return this.aString; - } - - public void setAString(String aString) { - this.aString = aString; - } - - public void unsetAString() { - this.aString = null; - } - - // Returns true if field aString is set (has been asigned a value) and false otherwise - public boolean isSetAString() { - return this.aString != null; - } - - public void setAStringIsSet(boolean value) { - if (!value) { - this.aString = null; - } - } - - public int getLintSize() { - return (this.lint == null) ? 0 : this.lint.size(); - } - - public java.util.Iterator getLintIterator() { - return (this.lint == null) ? null : this.lint.iterator(); - } - - public void addToLint(int elem) { - if (this.lint == null) { - this.lint = new ArrayList(); - } - this.lint.add(elem); - } - - public List getLint() { - return this.lint; - } - - public void setLint(List lint) { - this.lint = lint; - } - - public void unsetLint() { - this.lint = null; - } - - // Returns true if field lint is set (has been asigned a value) and false otherwise - public boolean isSetLint() { - return this.lint != null; - } - - public void setLintIsSet(boolean value) { - if (!value) { - this.lint = null; - } - } - - public int getLStringSize() { - return (this.lString == null) ? 0 : this.lString.size(); - } - - public java.util.Iterator getLStringIterator() { - return (this.lString == null) ? null : this.lString.iterator(); - } - - public void addToLString(String elem) { - if (this.lString == null) { - this.lString = new ArrayList(); - } - this.lString.add(elem); - } - - public List getLString() { - return this.lString; - } - - public void setLString(List lString) { - this.lString = lString; - } - - public void unsetLString() { - this.lString = null; - } - - // Returns true if field lString is set (has been asigned a value) and false otherwise - public boolean isSetLString() { - return this.lString != null; - } - - public void setLStringIsSet(boolean value) { - if (!value) { - this.lString = null; - } - } - - public int getLintStringSize() { - return (this.lintString == null) ? 0 : this.lintString.size(); - } - - public java.util.Iterator getLintStringIterator() { - return (this.lintString == null) ? null : this.lintString.iterator(); - } - - public void addToLintString(IntString elem) { - if (this.lintString == null) { - this.lintString = new ArrayList(); - } - this.lintString.add(elem); - } - - public List getLintString() { - return this.lintString; - } - - public void setLintString(List lintString) { - this.lintString = lintString; - } - - public void unsetLintString() { - this.lintString = null; - } - - // Returns true if field lintString is set (has been asigned a value) and false otherwise - public boolean isSetLintString() { - return this.lintString != null; - } - - public void setLintStringIsSet(boolean value) { - if (!value) { - this.lintString = null; - } - } - - public int getMStringStringSize() { - return (this.mStringString == null) ? 0 : this.mStringString.size(); - } - - public void putToMStringString(String key, String val) { - if (this.mStringString == null) { - this.mStringString = new HashMap(); - } - this.mStringString.put(key, val); - } - - public Map getMStringString() { - return this.mStringString; - } - - public void setMStringString(Map mStringString) { - this.mStringString = mStringString; - } - - public void unsetMStringString() { - this.mStringString = null; - } - - // Returns true if field mStringString is set (has been asigned a value) and false otherwise - public boolean isSetMStringString() { - return this.mStringString != null; - } - - public void setMStringStringIsSet(boolean value) { - if (!value) { - this.mStringString = null; - } - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case AINT: - if (value == null) { - unsetAint(); - } else { - setAint((Integer)value); - } - break; - - case ASTRING: - if (value == null) { - unsetAString(); - } else { - setAString((String)value); - } - break; - - case LINT: - if (value == null) { - unsetLint(); - } else { - setLint((List)value); - } - break; - - case LSTRING: - if (value == null) { - unsetLString(); - } else { - setLString((List)value); - } - break; - - case LINTSTRING: - if (value == null) { - unsetLintString(); - } else { - setLintString((List)value); - } - break; - - case MSTRINGSTRING: - if (value == null) { - unsetMStringString(); - } else { - setMStringString((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case AINT: - return new Integer(getAint()); - - case ASTRING: - return getAString(); - - case LINT: - return getLint(); - - case LSTRING: - return getLString(); - - case LINTSTRING: - return getLintString(); - - case MSTRINGSTRING: - return getMStringString(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case AINT: - return isSetAint(); - case ASTRING: - return isSetAString(); - case LINT: - return isSetLint(); - case LSTRING: - return isSetLString(); - case LINTSTRING: - return isSetLintString(); - case MSTRINGSTRING: - return isSetMStringString(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Complex) - return this.equals((Complex)that); - return false; - } - - public boolean equals(Complex that) { - if (that == null) - return false; - - boolean this_present_aint = true; - boolean that_present_aint = true; - if (this_present_aint || that_present_aint) { - if (!(this_present_aint && that_present_aint)) - return false; - if (this.aint != that.aint) - return false; - } - - boolean this_present_aString = true && this.isSetAString(); - boolean that_present_aString = true && that.isSetAString(); - if (this_present_aString || that_present_aString) { - if (!(this_present_aString && that_present_aString)) - return false; - if (!this.aString.equals(that.aString)) - return false; - } - - boolean this_present_lint = true && this.isSetLint(); - boolean that_present_lint = true && that.isSetLint(); - if (this_present_lint || that_present_lint) { - if (!(this_present_lint && that_present_lint)) - return false; - if (!this.lint.equals(that.lint)) - return false; - } - - boolean this_present_lString = true && this.isSetLString(); - boolean that_present_lString = true && that.isSetLString(); - if (this_present_lString || that_present_lString) { - if (!(this_present_lString && that_present_lString)) - return false; - if (!this.lString.equals(that.lString)) - return false; - } - - boolean this_present_lintString = true && this.isSetLintString(); - boolean that_present_lintString = true && that.isSetLintString(); - if (this_present_lintString || that_present_lintString) { - if (!(this_present_lintString && that_present_lintString)) - return false; - if (!this.lintString.equals(that.lintString)) - return false; - } - - boolean this_present_mStringString = true && this.isSetMStringString(); - boolean that_present_mStringString = true && that.isSetMStringString(); - if (this_present_mStringString || that_present_mStringString) { - if (!(this_present_mStringString && that_present_mStringString)) - return false; - if (!this.mStringString.equals(that.mStringString)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case AINT: - if (field.type == TType.I32) { - this.aint = iprot.readI32(); - this.__isset.aint = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ASTRING: - if (field.type == TType.STRING) { - this.aString = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LINT: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.lint = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - int _elem2; - _elem2 = iprot.readI32(); - this.lint.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LSTRING: - if (field.type == TType.LIST) { - { - TList _list3 = iprot.readListBegin(); - this.lString = new ArrayList(_list3.size); - for (int _i4 = 0; _i4 < _list3.size; ++_i4) - { - String _elem5; - _elem5 = iprot.readString(); - this.lString.add(_elem5); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LINTSTRING: - if (field.type == TType.LIST) { - { - TList _list6 = iprot.readListBegin(); - this.lintString = new ArrayList(_list6.size); - for (int _i7 = 0; _i7 < _list6.size; ++_i7) - { - IntString _elem8; - _elem8 = new IntString(); - _elem8.read(iprot); - this.lintString.add(_elem8); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MSTRINGSTRING: - if (field.type == TType.MAP) { - { - TMap _map9 = iprot.readMapBegin(); - this.mStringString = new HashMap(2*_map9.size); - for (int _i10 = 0; _i10 < _map9.size; ++_i10) - { - String _key11; - String _val12; - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.mStringString.put(_key11, _val12); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(AINT_FIELD_DESC); - oprot.writeI32(this.aint); - oprot.writeFieldEnd(); - if (this.aString != null) { - oprot.writeFieldBegin(A_STRING_FIELD_DESC); - oprot.writeString(this.aString); - oprot.writeFieldEnd(); - } - if (this.lint != null) { - oprot.writeFieldBegin(LINT_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.I32, this.lint.size())); - for (int _iter13 : this.lint) { - oprot.writeI32(_iter13); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lString != null) { - oprot.writeFieldBegin(L_STRING_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.lString.size())); - for (String _iter14 : this.lString) { - oprot.writeString(_iter14); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lintString != null) { - oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size())); - for (IntString _iter15 : this.lintString) { - _iter15.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.mStringString != null) { - oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.mStringString.size())); - for (Map.Entry _iter16 : this.mStringString.entrySet()) { - oprot.writeString(_iter16.getKey()); - oprot.writeString(_iter16.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Complex("); - boolean first = true; - - sb.append("aint:"); - sb.append(this.aint); - first = false; - if (!first) sb.append(", "); - sb.append("aString:"); - if (this.aString == null) { - sb.append("null"); - } else { - sb.append(this.aString); - } - first = false; - if (!first) sb.append(", "); - sb.append("lint:"); - if (this.lint == null) { - sb.append("null"); - } else { - sb.append(this.lint); - } - first = false; - if (!first) sb.append(", "); - sb.append("lString:"); - if (this.lString == null) { - sb.append("null"); - } else { - sb.append(this.lString); - } - first = false; - if (!first) sb.append(", "); - sb.append("lintString:"); - if (this.lintString == null) { - sb.append("null"); - } else { - sb.append(this.lintString); - } - first = false; - if (!first) sb.append(", "); - sb.append("mStringString:"); - if (this.mStringString == null) { - sb.append("null"); - } else { - sb.append(this.mStringString); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java deleted file mode 100644 index 0fe0fb0..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import org.apache.thrift.*; - -public class Constants { - -} diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java deleted file mode 100644 index 248413b..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class IntString implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("IntString"); - private static final TField MYINT_FIELD_DESC = new TField("myint", TType.I32, (short)1); - private static final TField MY_STRING_FIELD_DESC = new TField("myString", TType.STRING, (short)2); - private static final TField UNDERSCORE_INT_FIELD_DESC = new TField("underscore_int", TType.I32, (short)3); - - public int myint; - public static final int MYINT = 1; - public String myString; - public static final int MYSTRING = 2; - public int underscore_int; - public static final int UNDERSCORE_INT = 3; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean myint = false; - public boolean underscore_int = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(MYSTRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap); - } - - public IntString() { - } - - public IntString( - int myint, - String myString, - int underscore_int) - { - this(); - this.myint = myint; - this.__isset.myint = true; - this.myString = myString; - this.underscore_int = underscore_int; - this.__isset.underscore_int = true; - } - - /** - * Performs a deep copy on other. - */ - public IntString(IntString other) { - __isset.myint = other.__isset.myint; - this.myint = other.myint; - if (other.isSetMyString()) { - this.myString = other.myString; - } - __isset.underscore_int = other.__isset.underscore_int; - this.underscore_int = other.underscore_int; - } - - @Override - public IntString clone() { - return new IntString(this); - } - - public int getMyint() { - return this.myint; - } - - public void setMyint(int myint) { - this.myint = myint; - this.__isset.myint = true; - } - - public void unsetMyint() { - this.__isset.myint = false; - } - - // Returns true if field myint is set (has been asigned a value) and false otherwise - public boolean isSetMyint() { - return this.__isset.myint; - } - - public void setMyintIsSet(boolean value) { - this.__isset.myint = value; - } - - public String getMyString() { - return this.myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } - - public void unsetMyString() { - this.myString = null; - } - - // Returns true if field myString is set (has been asigned a value) and false otherwise - public boolean isSetMyString() { - return this.myString != null; - } - - public void setMyStringIsSet(boolean value) { - if (!value) { - this.myString = null; - } - } - - public int getUnderscore_int() { - return this.underscore_int; - } - - public void setUnderscore_int(int underscore_int) { - this.underscore_int = underscore_int; - this.__isset.underscore_int = true; - } - - public void unsetUnderscore_int() { - this.__isset.underscore_int = false; - } - - // Returns true if field underscore_int is set (has been asigned a value) and false otherwise - public boolean isSetUnderscore_int() { - return this.__isset.underscore_int; - } - - public void setUnderscore_intIsSet(boolean value) { - this.__isset.underscore_int = value; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MYINT: - if (value == null) { - unsetMyint(); - } else { - setMyint((Integer)value); - } - break; - - case MYSTRING: - if (value == null) { - unsetMyString(); - } else { - setMyString((String)value); - } - break; - - case UNDERSCORE_INT: - if (value == null) { - unsetUnderscore_int(); - } else { - setUnderscore_int((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MYINT: - return new Integer(getMyint()); - - case MYSTRING: - return getMyString(); - - case UNDERSCORE_INT: - return new Integer(getUnderscore_int()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MYINT: - return isSetMyint(); - case MYSTRING: - return isSetMyString(); - case UNDERSCORE_INT: - return isSetUnderscore_int(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof IntString) - return this.equals((IntString)that); - return false; - } - - public boolean equals(IntString that) { - if (that == null) - return false; - - boolean this_present_myint = true; - boolean that_present_myint = true; - if (this_present_myint || that_present_myint) { - if (!(this_present_myint && that_present_myint)) - return false; - if (this.myint != that.myint) - return false; - } - - boolean this_present_myString = true && this.isSetMyString(); - boolean that_present_myString = true && that.isSetMyString(); - if (this_present_myString || that_present_myString) { - if (!(this_present_myString && that_present_myString)) - return false; - if (!this.myString.equals(that.myString)) - return false; - } - - boolean this_present_underscore_int = true; - boolean that_present_underscore_int = true; - if (this_present_underscore_int || that_present_underscore_int) { - if (!(this_present_underscore_int && that_present_underscore_int)) - return false; - if (this.underscore_int != that.underscore_int) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MYINT: - if (field.type == TType.I32) { - this.myint = iprot.readI32(); - this.__isset.myint = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MYSTRING: - if (field.type == TType.STRING) { - this.myString = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case UNDERSCORE_INT: - if (field.type == TType.I32) { - this.underscore_int = iprot.readI32(); - this.__isset.underscore_int = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MYINT_FIELD_DESC); - oprot.writeI32(this.myint); - oprot.writeFieldEnd(); - if (this.myString != null) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.myString); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); - oprot.writeI32(this.underscore_int); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("IntString("); - boolean first = true; - - sb.append("myint:"); - sb.append(this.myint); - first = false; - if (!first) sb.append(", "); - sb.append("myString:"); - if (this.myString == null) { - sb.append("null"); - } else { - sb.append(this.myString); - } - first = false; - if (!first) sb.append(", "); - sb.append("underscore_int:"); - sb.append(this.underscore_int); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-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/__init__.py serde/src/gen-py/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git serde/src/gen-py/org_apache_hadoop_hive_serde/__init__.py serde/src/gen-py/org_apache_hadoop_hive_serde/__init__.py deleted file mode 100644 index adefd8e..0000000 --- serde/src/gen-py/org_apache_hadoop_hive_serde/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants'] diff --git serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py deleted file mode 100644 index 89ac083..0000000 --- serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py +++ /dev/null @@ -1,93 +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 * - -SERIALIZATION_LIB = "serialization.lib" - -SERIALIZATION_CLASS = "serialization.class" - -SERIALIZATION_FORMAT = "serialization.format" - -SERIALIZATION_DDL = "serialization.ddl" - -SERIALIZATION_NULL_FORMAT = "serialization.null.format" - -SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest" - -SERIALIZATION_SORT_ORDER = "serialization.sort.order" - -SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object" - -FIELD_DELIM = "field.delim" - -COLLECTION_DELIM = "colelction.delim" - -LINE_DELIM = "line.delim" - -MAPKEY_DELIM = "mapkey.delim" - -QUOTE_CHAR = "quote.delim" - -ESCAPE_CHAR = "escape.delim" - -VOID_TYPE_NAME = "void" - -BOOLEAN_TYPE_NAME = "boolean" - -TINYINT_TYPE_NAME = "tinyint" - -SMALLINT_TYPE_NAME = "smallint" - -INT_TYPE_NAME = "int" - -BIGINT_TYPE_NAME = "bigint" - -FLOAT_TYPE_NAME = "float" - -DOUBLE_TYPE_NAME = "double" - -STRING_TYPE_NAME = "string" - -DATE_TYPE_NAME = "date" - -DATETIME_TYPE_NAME = "datetime" - -TIMESTAMP_TYPE_NAME = "timestamp" - -LIST_TYPE_NAME = "array" - -MAP_TYPE_NAME = "map" - -STRUCT_TYPE_NAME = "struct" - -UNION_TYPE_NAME = "uniontype" - -LIST_COLUMNS = "columns" - -LIST_COLUMN_TYPES = "columns.types" - -PrimitiveTypes = set([ - "void", - "boolean", - "tinyint", - "smallint", - "int", - "bigint", - "float", - "double", - "string", - "date", - "datetime", - "timestamp", -]) - -CollectionTypes = set([ - "array", - "map", -]) - diff --git serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py deleted file mode 100644 index c98f71f..0000000 --- serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py +++ /dev/null @@ -1,16 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - diff --git serde/src/gen-py/serde/.gitignore serde/src/gen-py/serde/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-py/serde/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen/protobuf/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java serde/src/gen/protobuf/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java new file mode 100644 index 0000000..2fddbfb --- /dev/null +++ serde/src/gen/protobuf/gen-java/org/apache/hadoop/hive/serde2/proto/test/Complexpb.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: complexpb.proto + +package org.apache.hadoop.hive.serde2.proto.test; + +public final class Complexpb { + private Complexpb() {} + + public static final class IntString { + public IntString(int myInt, String myString, int underscoreInt) { + this.myint_ = myInt; + this.hasMyint = true; + this.myString_ = myString; + this.hasMyString = true; + this.underscoreInt_ = underscoreInt; + this.hasUnderscoreInt = true; + } + + // optional int32 myint = 1; + public static final int MYINT_FIELD_NUMBER = 1; + private final boolean hasMyint; + private int myint_ = 0; + public boolean hasMyint() { return hasMyint; } + public int getMyint() { return myint_; } + + // optional string myString = 2; + public static final int MYSTRING_FIELD_NUMBER = 2; + private final boolean hasMyString; + private java.lang.String myString_ = ""; + public boolean hasMyString() { return hasMyString; } + public java.lang.String getMyString() { return myString_; } + + // optional int32 underscore_int = 3; + public static final int UNDERSCORE_INT_FIELD_NUMBER = 3; + private final boolean hasUnderscoreInt; + private int underscoreInt_ = 0; + public boolean hasUnderscoreInt() { return hasUnderscoreInt; } + public int getUnderscoreInt() { return underscoreInt_; } + + public final boolean isInitialized() { + return true; + } + + } + + public static final class Complex { + // Use Complex.newBuilder() to construct. + public Complex(int aint, String aString, java.util.List lint, java.util.List lString, java.util.List lintString) { + this.aint_ = aint; + this.hasAint = true; + this.aString_ = aString; + this.hasAString = true; + this.lint_ = lint; + this.lString_ = lString; + this.lintString_ = lintString; + } + + // optional int32 aint = 1; + public static final int AINT_FIELD_NUMBER = 1; + private final boolean hasAint; + private int aint_ = 0; + public boolean hasAint() { return hasAint; } + public int getAint() { return aint_; } + + // optional string aString = 2; + public static final int ASTRING_FIELD_NUMBER = 2; + private final boolean hasAString; + private java.lang.String aString_ = ""; + public boolean hasAString() { return hasAString; } + public java.lang.String getAString() { return aString_; } + + // repeated int32 lint = 3; + public static final int LINT_FIELD_NUMBER = 3; + private java.util.List lint_ = + java.util.Collections.emptyList(); + public java.util.List getLintList() { + return lint_; + } + public int getLintCount() { return lint_.size(); } + public int getLint(int index) { + return lint_.get(index); + } + + // repeated string lString = 4; + public static final int LSTRING_FIELD_NUMBER = 4; + private java.util.List lString_ = + java.util.Collections.emptyList(); + public java.util.List getLStringList() { + return lString_; + } + public int getLStringCount() { return lString_.size(); } + public java.lang.String getLString(int index) { + return lString_.get(index); + } + + // repeated .org.apache.hadoop.hive.serde2.proto.test.IntString lintString = 5; + public static final int LINTSTRING_FIELD_NUMBER = 5; + private java.util.List lintString_ = + java.util.Collections.emptyList(); + public java.util.List getLintStringList() { + return lintString_; + } + public int getLintStringCount() { return lintString_.size(); } + public org.apache.hadoop.hive.serde2.proto.test.Complexpb.IntString getLintString(int index) { + return lintString_.get(index); + } + + private void initFields() { + } + public final boolean isInitialized() { + return true; + } + + // @@protoc_insertion_point(class_scope:org.apache.hadoop.hive.serde2.proto.test.Complex) + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git serde/src/gen/thrift/gen-cpp/serde_constants.cpp serde/src/gen/thrift/gen-cpp/serde_constants.cpp new file mode 100644 index 0000000..52811cf --- /dev/null +++ serde/src/gen/thrift/gen-cpp/serde_constants.cpp @@ -0,0 +1,96 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "serde_constants.h" + +namespace Hive { + +const serdeConstants g_serde_constants; + +serdeConstants::serdeConstants() { + SERIALIZATION_LIB = "serialization.lib"; + + SERIALIZATION_CLASS = "serialization.class"; + + SERIALIZATION_FORMAT = "serialization.format"; + + SERIALIZATION_DDL = "serialization.ddl"; + + SERIALIZATION_NULL_FORMAT = "serialization.null.format"; + + SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; + + SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + + SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + + FIELD_DELIM = "field.delim"; + + COLLECTION_DELIM = "colelction.delim"; + + LINE_DELIM = "line.delim"; + + MAPKEY_DELIM = "mapkey.delim"; + + QUOTE_CHAR = "quote.delim"; + + ESCAPE_CHAR = "escape.delim"; + + VOID_TYPE_NAME = "void"; + + BOOLEAN_TYPE_NAME = "boolean"; + + TINYINT_TYPE_NAME = "tinyint"; + + SMALLINT_TYPE_NAME = "smallint"; + + INT_TYPE_NAME = "int"; + + BIGINT_TYPE_NAME = "bigint"; + + FLOAT_TYPE_NAME = "float"; + + DOUBLE_TYPE_NAME = "double"; + + STRING_TYPE_NAME = "string"; + + DATE_TYPE_NAME = "date"; + + DATETIME_TYPE_NAME = "datetime"; + + TIMESTAMP_TYPE_NAME = "timestamp"; + + LIST_TYPE_NAME = "array"; + + MAP_TYPE_NAME = "map"; + + STRUCT_TYPE_NAME = "struct"; + + UNION_TYPE_NAME = "uniontype"; + + LIST_COLUMNS = "columns"; + + LIST_COLUMN_TYPES = "columns.types"; + + PrimitiveTypes.insert("void"); + PrimitiveTypes.insert("boolean"); + PrimitiveTypes.insert("tinyint"); + PrimitiveTypes.insert("smallint"); + PrimitiveTypes.insert("int"); + PrimitiveTypes.insert("bigint"); + PrimitiveTypes.insert("float"); + PrimitiveTypes.insert("double"); + PrimitiveTypes.insert("string"); + PrimitiveTypes.insert("date"); + PrimitiveTypes.insert("datetime"); + PrimitiveTypes.insert("timestamp"); + + CollectionTypes.insert("array"); + CollectionTypes.insert("map"); + +} + +} // namespace + diff --git serde/src/gen/thrift/gen-cpp/serde_constants.h serde/src/gen/thrift/gen-cpp/serde_constants.h new file mode 100644 index 0000000..b7a67ba --- /dev/null +++ serde/src/gen/thrift/gen-cpp/serde_constants.h @@ -0,0 +1,57 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef serde_CONSTANTS_H +#define serde_CONSTANTS_H + +#include "serde_types.h" + +namespace Hive { + +class serdeConstants { + public: + serdeConstants(); + + std::string SERIALIZATION_LIB; + std::string SERIALIZATION_CLASS; + std::string SERIALIZATION_FORMAT; + std::string SERIALIZATION_DDL; + 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; + std::string MAPKEY_DELIM; + std::string QUOTE_CHAR; + std::string ESCAPE_CHAR; + std::string VOID_TYPE_NAME; + std::string BOOLEAN_TYPE_NAME; + std::string TINYINT_TYPE_NAME; + std::string SMALLINT_TYPE_NAME; + std::string INT_TYPE_NAME; + std::string BIGINT_TYPE_NAME; + std::string FLOAT_TYPE_NAME; + std::string DOUBLE_TYPE_NAME; + std::string STRING_TYPE_NAME; + std::string DATE_TYPE_NAME; + std::string DATETIME_TYPE_NAME; + std::string TIMESTAMP_TYPE_NAME; + std::string LIST_TYPE_NAME; + std::string MAP_TYPE_NAME; + std::string STRUCT_TYPE_NAME; + std::string UNION_TYPE_NAME; + std::string LIST_COLUMNS; + std::string LIST_COLUMN_TYPES; + std::set PrimitiveTypes; + std::set CollectionTypes; +}; + +extern const serdeConstants g_serde_constants; + +} // namespace + +#endif diff --git serde/src/gen/thrift/gen-cpp/serde_types.cpp serde/src/gen/thrift/gen-cpp/serde_types.cpp new file mode 100644 index 0000000..826f2bb --- /dev/null +++ serde/src/gen/thrift/gen-cpp/serde_types.cpp @@ -0,0 +1,10 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "serde_types.h" + +namespace Hive { + +} // namespace diff --git serde/src/gen/thrift/gen-cpp/serde_types.h serde/src/gen/thrift/gen-cpp/serde_types.h new file mode 100644 index 0000000..8a9d46c --- /dev/null +++ serde/src/gen/thrift/gen-cpp/serde_types.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef serde_TYPES_H +#define serde_TYPES_H + +#include +#include +#include +#include + + + +namespace Hive { + +typedef std::string PrimitiveType; + +typedef std::string CollectionType; + +} // namespace + +#endif diff --git serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java new file mode 100644 index 0000000..b062442 --- /dev/null +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java @@ -0,0 +1,111 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Constants { + + public static final String SERIALIZATION_LIB = "serialization.lib"; + + public static final String SERIALIZATION_CLASS = "serialization.class"; + + public static final String SERIALIZATION_FORMAT = "serialization.format"; + + public static final String SERIALIZATION_DDL = "serialization.ddl"; + + public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; + + public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; + + public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + + public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + + public static final String FIELD_DELIM = "field.delim"; + + public static final String COLLECTION_DELIM = "colelction.delim"; + + public static final String LINE_DELIM = "line.delim"; + + public static final String MAPKEY_DELIM = "mapkey.delim"; + + public static final String QUOTE_CHAR = "quote.delim"; + + public static final String ESCAPE_CHAR = "escape.delim"; + + public static final String VOID_TYPE_NAME = "void"; + + public static final String BOOLEAN_TYPE_NAME = "boolean"; + + public static final String TINYINT_TYPE_NAME = "tinyint"; + + public static final String SMALLINT_TYPE_NAME = "smallint"; + + public static final String INT_TYPE_NAME = "int"; + + public static final String BIGINT_TYPE_NAME = "bigint"; + + public static final String FLOAT_TYPE_NAME = "float"; + + public static final String DOUBLE_TYPE_NAME = "double"; + + public static final String STRING_TYPE_NAME = "string"; + + public static final String DATE_TYPE_NAME = "date"; + + public static final String DATETIME_TYPE_NAME = "datetime"; + + public static final String TIMESTAMP_TYPE_NAME = "timestamp"; + + public static final String LIST_TYPE_NAME = "array"; + + public static final String MAP_TYPE_NAME = "map"; + + public static final String STRUCT_TYPE_NAME = "struct"; + + public static final String UNION_TYPE_NAME = "uniontype"; + + public static final String LIST_COLUMNS = "columns"; + + public static final String LIST_COLUMN_TYPES = "columns.types"; + + public static final Set PrimitiveTypes = new HashSet(); + static { + PrimitiveTypes.add("void"); + PrimitiveTypes.add("boolean"); + PrimitiveTypes.add("tinyint"); + PrimitiveTypes.add("smallint"); + PrimitiveTypes.add("int"); + PrimitiveTypes.add("bigint"); + PrimitiveTypes.add("float"); + PrimitiveTypes.add("double"); + PrimitiveTypes.add("string"); + PrimitiveTypes.add("date"); + PrimitiveTypes.add("datetime"); + PrimitiveTypes.add("timestamp"); + } + + public static final Set CollectionTypes = new HashSet(); + static { + CollectionTypes.add("array"); + CollectionTypes.add("map"); + } + +} diff --git serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java new file mode 100644 index 0000000..248faa5 --- /dev/null +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java @@ -0,0 +1,304 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde.test; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class InnerStruct implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("InnerStruct"); + + private static final TField FIELD0_FIELD_DESC = new TField("field0", TType.I32, (short)1); + + private int field0; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + FIELD0((short)1, "field0"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FIELD0 + return FIELD0; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __FIELD0_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD0, new FieldMetaData("field0", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); + } + + public InnerStruct() { + } + + public InnerStruct( + int field0) + { + this(); + this.field0 = field0; + setField0IsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public InnerStruct(InnerStruct other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.field0 = other.field0; + } + + public InnerStruct deepCopy() { + return new InnerStruct(this); + } + + @Override + public void clear() { + setField0IsSet(false); + this.field0 = 0; + } + + public int getField0() { + return this.field0; + } + + public void setField0(int field0) { + this.field0 = field0; + setField0IsSet(true); + } + + public void unsetField0() { + __isset_bit_vector.clear(__FIELD0_ISSET_ID); + } + + /** Returns true if field field0 is set (has been asigned a value) and false otherwise */ + public boolean isSetField0() { + return __isset_bit_vector.get(__FIELD0_ISSET_ID); + } + + public void setField0IsSet(boolean value) { + __isset_bit_vector.set(__FIELD0_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD0: + if (value == null) { + unsetField0(); + } else { + setField0((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD0: + return new Integer(getField0()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD0: + return isSetField0(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InnerStruct) + return this.equals((InnerStruct)that); + return false; + } + + public boolean equals(InnerStruct that) { + if (that == null) + return false; + + boolean this_present_field0 = true; + boolean that_present_field0 = true; + if (this_present_field0 || that_present_field0) { + if (!(this_present_field0 && that_present_field0)) + return false; + if (this.field0 != that.field0) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(InnerStruct other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InnerStruct typedOther = (InnerStruct)other; + + lastComparison = Boolean.valueOf(isSetField0()).compareTo(typedOther.isSetField0()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField0()) { + lastComparison = TBaseHelper.compareTo(this.field0, typedOther.field0); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // FIELD0 + if (field.type == TType.I32) { + this.field0 = iprot.readI32(); + setField0IsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD0_FIELD_DESC); + oprot.writeI32(this.field0); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InnerStruct("); + boolean first = true; + + sb.append("field0:"); + sb.append(this.field0); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java new file mode 100644 index 0000000..26ec311 --- /dev/null +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java @@ -0,0 +1,518 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde.test; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ThriftTestObj"); + + private static final TField FIELD1_FIELD_DESC = new TField("field1", TType.I32, (short)1); + private static final TField FIELD2_FIELD_DESC = new TField("field2", TType.STRING, (short)2); + private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.LIST, (short)3); + + private int field1; + private String field2; + private List field3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + FIELD1((short)1, "field1"), + FIELD2((short)2, "field2"), + FIELD3((short)3, "field3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FIELD1 + return FIELD1; + case 2: // FIELD2 + return FIELD2; + case 3: // FIELD3 + return FIELD3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __FIELD1_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, InnerStruct.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); + } + + public ThriftTestObj() { + } + + public ThriftTestObj( + int field1, + String field2, + List field3) + { + this(); + this.field1 = field1; + setField1IsSet(true); + this.field2 = field2; + this.field3 = field3; + } + + /** + * Performs a deep copy on other. + */ + public ThriftTestObj(ThriftTestObj other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.field1 = other.field1; + if (other.isSetField2()) { + this.field2 = other.field2; + } + if (other.isSetField3()) { + List __this__field3 = new ArrayList(); + for (InnerStruct other_element : other.field3) { + __this__field3.add(new InnerStruct(other_element)); + } + this.field3 = __this__field3; + } + } + + public ThriftTestObj deepCopy() { + return new ThriftTestObj(this); + } + + @Override + public void clear() { + setField1IsSet(false); + this.field1 = 0; + this.field2 = null; + this.field3 = null; + } + + public int getField1() { + return this.field1; + } + + public void setField1(int field1) { + this.field1 = field1; + setField1IsSet(true); + } + + public void unsetField1() { + __isset_bit_vector.clear(__FIELD1_ISSET_ID); + } + + /** Returns true if field field1 is set (has been asigned a value) and false otherwise */ + public boolean isSetField1() { + return __isset_bit_vector.get(__FIELD1_ISSET_ID); + } + + public void setField1IsSet(boolean value) { + __isset_bit_vector.set(__FIELD1_ISSET_ID, value); + } + + public String getField2() { + return this.field2; + } + + public void setField2(String field2) { + this.field2 = field2; + } + + public void unsetField2() { + this.field2 = null; + } + + /** Returns true if field field2 is set (has been asigned a value) and false otherwise */ + public boolean isSetField2() { + return this.field2 != null; + } + + public void setField2IsSet(boolean value) { + if (!value) { + this.field2 = null; + } + } + + public int getField3Size() { + return (this.field3 == null) ? 0 : this.field3.size(); + } + + public java.util.Iterator getField3Iterator() { + return (this.field3 == null) ? null : this.field3.iterator(); + } + + public void addToField3(InnerStruct elem) { + if (this.field3 == null) { + this.field3 = new ArrayList(); + } + this.field3.add(elem); + } + + public List getField3() { + return this.field3; + } + + public void setField3(List field3) { + this.field3 = field3; + } + + public void unsetField3() { + this.field3 = null; + } + + /** Returns true if field field3 is set (has been asigned a value) and false otherwise */ + public boolean isSetField3() { + return this.field3 != null; + } + + public void setField3IsSet(boolean value) { + if (!value) { + this.field3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD1: + if (value == null) { + unsetField1(); + } else { + setField1((Integer)value); + } + break; + + case FIELD2: + if (value == null) { + unsetField2(); + } else { + setField2((String)value); + } + break; + + case FIELD3: + if (value == null) { + unsetField3(); + } else { + setField3((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD1: + return new Integer(getField1()); + + case FIELD2: + return getField2(); + + case FIELD3: + return getField3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD1: + return isSetField1(); + case FIELD2: + return isSetField2(); + case FIELD3: + return isSetField3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ThriftTestObj) + return this.equals((ThriftTestObj)that); + return false; + } + + public boolean equals(ThriftTestObj that) { + if (that == null) + return false; + + boolean this_present_field1 = true; + boolean that_present_field1 = true; + if (this_present_field1 || that_present_field1) { + if (!(this_present_field1 && that_present_field1)) + return false; + if (this.field1 != that.field1) + return false; + } + + boolean this_present_field2 = true && this.isSetField2(); + boolean that_present_field2 = true && that.isSetField2(); + if (this_present_field2 || that_present_field2) { + if (!(this_present_field2 && that_present_field2)) + return false; + if (!this.field2.equals(that.field2)) + return false; + } + + boolean this_present_field3 = true && this.isSetField3(); + boolean that_present_field3 = true && that.isSetField3(); + if (this_present_field3 || that_present_field3) { + if (!(this_present_field3 && that_present_field3)) + return false; + if (!this.field3.equals(that.field3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ThriftTestObj other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ThriftTestObj typedOther = (ThriftTestObj)other; + + lastComparison = Boolean.valueOf(isSetField1()).compareTo(typedOther.isSetField1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField1()) { + lastComparison = TBaseHelper.compareTo(this.field1, typedOther.field1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetField2()).compareTo(typedOther.isSetField2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField2()) { + lastComparison = TBaseHelper.compareTo(this.field2, typedOther.field2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetField3()).compareTo(typedOther.isSetField3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField3()) { + lastComparison = TBaseHelper.compareTo(this.field3, typedOther.field3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // FIELD1 + if (field.type == TType.I32) { + this.field1 = iprot.readI32(); + setField1IsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // FIELD2 + if (field.type == TType.STRING) { + this.field2 = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // FIELD3 + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.field3 = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + InnerStruct _elem2; + _elem2 = new InnerStruct(); + _elem2.read(iprot); + this.field3.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD1_FIELD_DESC); + oprot.writeI32(this.field1); + oprot.writeFieldEnd(); + if (this.field2 != null) { + oprot.writeFieldBegin(FIELD2_FIELD_DESC); + oprot.writeString(this.field2); + oprot.writeFieldEnd(); + } + if (this.field3 != null) { + oprot.writeFieldBegin(FIELD3_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); + for (InnerStruct _iter3 : this.field3) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ThriftTestObj("); + boolean first = true; + + sb.append("field1:"); + sb.append(this.field1); + first = false; + if (!first) sb.append(", "); + sb.append("field2:"); + if (this.field2 == null) { + sb.append("null"); + } else { + sb.append(this.field2); + } + first = false; + if (!first) sb.append(", "); + sb.append("field3:"); + if (this.field3 == null) { + sb.append("null"); + } else { + sb.append(this.field3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java new file mode 100644 index 0000000..1962098 --- /dev/null +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java @@ -0,0 +1,901 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde2.thrift.test; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class Complex implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("Complex"); + + private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1); + private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2); + private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3); + private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4); + private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5); + private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6); + + private int aint; + private String aString; + private List lint; + private List lString; + private List lintString; + private Map mStringString; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + AINT((short)1, "aint"), + A_STRING((short)2, "aString"), + LINT((short)3, "lint"), + L_STRING((short)4, "lString"), + LINT_STRING((short)5, "lintString"), + M_STRING_STRING((short)6, "mStringString"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // AINT + return AINT; + case 2: // A_STRING + return A_STRING; + case 3: // LINT + return LINT; + case 4: // L_STRING + return L_STRING; + case 5: // LINT_STRING + return LINT_STRING; + case 6: // M_STRING_STRING + return M_STRING_STRING; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AINT_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.A_STRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.I32)))); + tmpMap.put(_Fields.L_STRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.LINT_STRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, IntString.class)))); + tmpMap.put(_Fields.M_STRING_STRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); + } + + public Complex() { + } + + public Complex( + int aint, + String aString, + List lint, + List lString, + List lintString, + Map mStringString) + { + this(); + this.aint = aint; + setAintIsSet(true); + this.aString = aString; + this.lint = lint; + this.lString = lString; + this.lintString = lintString; + this.mStringString = mStringString; + } + + /** + * Performs a deep copy on other. + */ + public Complex(Complex other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.aint = other.aint; + if (other.isSetAString()) { + this.aString = other.aString; + } + if (other.isSetLint()) { + List __this__lint = new ArrayList(); + for (Integer other_element : other.lint) { + __this__lint.add(other_element); + } + this.lint = __this__lint; + } + if (other.isSetLString()) { + List __this__lString = new ArrayList(); + for (String other_element : other.lString) { + __this__lString.add(other_element); + } + this.lString = __this__lString; + } + if (other.isSetLintString()) { + List __this__lintString = new ArrayList(); + for (IntString other_element : other.lintString) { + __this__lintString.add(new IntString(other_element)); + } + this.lintString = __this__lintString; + } + if (other.isSetMStringString()) { + Map __this__mStringString = new HashMap(); + for (Map.Entry other_element : other.mStringString.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__mStringString_copy_key = other_element_key; + + String __this__mStringString_copy_value = other_element_value; + + __this__mStringString.put(__this__mStringString_copy_key, __this__mStringString_copy_value); + } + this.mStringString = __this__mStringString; + } + } + + public Complex deepCopy() { + return new Complex(this); + } + + @Override + public void clear() { + setAintIsSet(false); + this.aint = 0; + this.aString = null; + this.lint = null; + this.lString = null; + this.lintString = null; + this.mStringString = null; + } + + public int getAint() { + return this.aint; + } + + public void setAint(int aint) { + this.aint = aint; + setAintIsSet(true); + } + + public void unsetAint() { + __isset_bit_vector.clear(__AINT_ISSET_ID); + } + + /** Returns true if field aint is set (has been asigned a value) and false otherwise */ + public boolean isSetAint() { + return __isset_bit_vector.get(__AINT_ISSET_ID); + } + + public void setAintIsSet(boolean value) { + __isset_bit_vector.set(__AINT_ISSET_ID, value); + } + + public String getAString() { + return this.aString; + } + + public void setAString(String aString) { + this.aString = aString; + } + + public void unsetAString() { + this.aString = null; + } + + /** Returns true if field aString is set (has been asigned a value) and false otherwise */ + public boolean isSetAString() { + return this.aString != null; + } + + public void setAStringIsSet(boolean value) { + if (!value) { + this.aString = null; + } + } + + public int getLintSize() { + return (this.lint == null) ? 0 : this.lint.size(); + } + + public java.util.Iterator getLintIterator() { + return (this.lint == null) ? null : this.lint.iterator(); + } + + public void addToLint(int elem) { + if (this.lint == null) { + this.lint = new ArrayList(); + } + this.lint.add(elem); + } + + public List getLint() { + return this.lint; + } + + public void setLint(List lint) { + this.lint = lint; + } + + public void unsetLint() { + this.lint = null; + } + + /** Returns true if field lint is set (has been asigned a value) and false otherwise */ + public boolean isSetLint() { + return this.lint != null; + } + + public void setLintIsSet(boolean value) { + if (!value) { + this.lint = null; + } + } + + public int getLStringSize() { + return (this.lString == null) ? 0 : this.lString.size(); + } + + public java.util.Iterator getLStringIterator() { + return (this.lString == null) ? null : this.lString.iterator(); + } + + public void addToLString(String elem) { + if (this.lString == null) { + this.lString = new ArrayList(); + } + this.lString.add(elem); + } + + public List getLString() { + return this.lString; + } + + public void setLString(List lString) { + this.lString = lString; + } + + public void unsetLString() { + this.lString = null; + } + + /** Returns true if field lString is set (has been asigned a value) and false otherwise */ + public boolean isSetLString() { + return this.lString != null; + } + + public void setLStringIsSet(boolean value) { + if (!value) { + this.lString = null; + } + } + + public int getLintStringSize() { + return (this.lintString == null) ? 0 : this.lintString.size(); + } + + public java.util.Iterator getLintStringIterator() { + return (this.lintString == null) ? null : this.lintString.iterator(); + } + + public void addToLintString(IntString elem) { + if (this.lintString == null) { + this.lintString = new ArrayList(); + } + this.lintString.add(elem); + } + + public List getLintString() { + return this.lintString; + } + + public void setLintString(List lintString) { + this.lintString = lintString; + } + + public void unsetLintString() { + this.lintString = null; + } + + /** Returns true if field lintString is set (has been asigned a value) and false otherwise */ + public boolean isSetLintString() { + return this.lintString != null; + } + + public void setLintStringIsSet(boolean value) { + if (!value) { + this.lintString = null; + } + } + + public int getMStringStringSize() { + return (this.mStringString == null) ? 0 : this.mStringString.size(); + } + + public void putToMStringString(String key, String val) { + if (this.mStringString == null) { + this.mStringString = new HashMap(); + } + this.mStringString.put(key, val); + } + + public Map getMStringString() { + return this.mStringString; + } + + public void setMStringString(Map mStringString) { + this.mStringString = mStringString; + } + + public void unsetMStringString() { + this.mStringString = null; + } + + /** Returns true if field mStringString is set (has been asigned a value) and false otherwise */ + public boolean isSetMStringString() { + return this.mStringString != null; + } + + public void setMStringStringIsSet(boolean value) { + if (!value) { + this.mStringString = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AINT: + if (value == null) { + unsetAint(); + } else { + setAint((Integer)value); + } + break; + + case A_STRING: + if (value == null) { + unsetAString(); + } else { + setAString((String)value); + } + break; + + case LINT: + if (value == null) { + unsetLint(); + } else { + setLint((List)value); + } + break; + + case L_STRING: + if (value == null) { + unsetLString(); + } else { + setLString((List)value); + } + break; + + case LINT_STRING: + if (value == null) { + unsetLintString(); + } else { + setLintString((List)value); + } + break; + + case M_STRING_STRING: + if (value == null) { + unsetMStringString(); + } else { + setMStringString((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AINT: + return new Integer(getAint()); + + case A_STRING: + return getAString(); + + case LINT: + return getLint(); + + case L_STRING: + return getLString(); + + case LINT_STRING: + return getLintString(); + + case M_STRING_STRING: + return getMStringString(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case AINT: + return isSetAint(); + case A_STRING: + return isSetAString(); + case LINT: + return isSetLint(); + case L_STRING: + return isSetLString(); + case LINT_STRING: + return isSetLintString(); + case M_STRING_STRING: + return isSetMStringString(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Complex) + return this.equals((Complex)that); + return false; + } + + public boolean equals(Complex that) { + if (that == null) + return false; + + boolean this_present_aint = true; + boolean that_present_aint = true; + if (this_present_aint || that_present_aint) { + if (!(this_present_aint && that_present_aint)) + return false; + if (this.aint != that.aint) + return false; + } + + boolean this_present_aString = true && this.isSetAString(); + boolean that_present_aString = true && that.isSetAString(); + if (this_present_aString || that_present_aString) { + if (!(this_present_aString && that_present_aString)) + return false; + if (!this.aString.equals(that.aString)) + return false; + } + + boolean this_present_lint = true && this.isSetLint(); + boolean that_present_lint = true && that.isSetLint(); + if (this_present_lint || that_present_lint) { + if (!(this_present_lint && that_present_lint)) + return false; + if (!this.lint.equals(that.lint)) + return false; + } + + boolean this_present_lString = true && this.isSetLString(); + boolean that_present_lString = true && that.isSetLString(); + if (this_present_lString || that_present_lString) { + if (!(this_present_lString && that_present_lString)) + return false; + if (!this.lString.equals(that.lString)) + return false; + } + + boolean this_present_lintString = true && this.isSetLintString(); + boolean that_present_lintString = true && that.isSetLintString(); + if (this_present_lintString || that_present_lintString) { + if (!(this_present_lintString && that_present_lintString)) + return false; + if (!this.lintString.equals(that.lintString)) + return false; + } + + boolean this_present_mStringString = true && this.isSetMStringString(); + boolean that_present_mStringString = true && that.isSetMStringString(); + if (this_present_mStringString || that_present_mStringString) { + if (!(this_present_mStringString && that_present_mStringString)) + return false; + if (!this.mStringString.equals(that.mStringString)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Complex other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Complex typedOther = (Complex)other; + + lastComparison = Boolean.valueOf(isSetAint()).compareTo(typedOther.isSetAint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAint()) { + lastComparison = TBaseHelper.compareTo(this.aint, typedOther.aint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAString()).compareTo(typedOther.isSetAString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAString()) { + lastComparison = TBaseHelper.compareTo(this.aString, typedOther.aString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLint()).compareTo(typedOther.isSetLint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLint()) { + lastComparison = TBaseHelper.compareTo(this.lint, typedOther.lint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLString()).compareTo(typedOther.isSetLString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLString()) { + lastComparison = TBaseHelper.compareTo(this.lString, typedOther.lString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLintString()).compareTo(typedOther.isSetLintString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLintString()) { + lastComparison = TBaseHelper.compareTo(this.lintString, typedOther.lintString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMStringString()).compareTo(typedOther.isSetMStringString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMStringString()) { + lastComparison = TBaseHelper.compareTo(this.mStringString, typedOther.mStringString); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // AINT + if (field.type == TType.I32) { + this.aint = iprot.readI32(); + setAintIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // A_STRING + if (field.type == TType.STRING) { + this.aString = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // LINT + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.lint = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + int _elem2; + _elem2 = iprot.readI32(); + this.lint.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // L_STRING + if (field.type == TType.LIST) { + { + TList _list3 = iprot.readListBegin(); + this.lString = new ArrayList(_list3.size); + for (int _i4 = 0; _i4 < _list3.size; ++_i4) + { + String _elem5; + _elem5 = iprot.readString(); + this.lString.add(_elem5); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // LINT_STRING + if (field.type == TType.LIST) { + { + TList _list6 = iprot.readListBegin(); + this.lintString = new ArrayList(_list6.size); + for (int _i7 = 0; _i7 < _list6.size; ++_i7) + { + IntString _elem8; + _elem8 = new IntString(); + _elem8.read(iprot); + this.lintString.add(_elem8); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // M_STRING_STRING + if (field.type == TType.MAP) { + { + TMap _map9 = iprot.readMapBegin(); + this.mStringString = new HashMap(2*_map9.size); + for (int _i10 = 0; _i10 < _map9.size; ++_i10) + { + String _key11; + String _val12; + _key11 = iprot.readString(); + _val12 = iprot.readString(); + this.mStringString.put(_key11, _val12); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(AINT_FIELD_DESC); + oprot.writeI32(this.aint); + oprot.writeFieldEnd(); + if (this.aString != null) { + oprot.writeFieldBegin(A_STRING_FIELD_DESC); + oprot.writeString(this.aString); + oprot.writeFieldEnd(); + } + if (this.lint != null) { + oprot.writeFieldBegin(LINT_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.I32, this.lint.size())); + for (int _iter13 : this.lint) + { + oprot.writeI32(_iter13); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.lString != null) { + oprot.writeFieldBegin(L_STRING_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.lString.size())); + for (String _iter14 : this.lString) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.lintString != null) { + oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size())); + for (IntString _iter15 : this.lintString) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.mStringString != null) { + oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.mStringString.size())); + for (Map.Entry _iter16 : this.mStringString.entrySet()) + { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Complex("); + boolean first = true; + + sb.append("aint:"); + sb.append(this.aint); + first = false; + if (!first) sb.append(", "); + sb.append("aString:"); + if (this.aString == null) { + sb.append("null"); + } else { + sb.append(this.aString); + } + first = false; + if (!first) sb.append(", "); + sb.append("lint:"); + if (this.lint == null) { + sb.append("null"); + } else { + sb.append(this.lint); + } + first = false; + if (!first) sb.append(", "); + sb.append("lString:"); + if (this.lString == null) { + sb.append("null"); + } else { + sb.append(this.lString); + } + first = false; + if (!first) sb.append(", "); + sb.append("lintString:"); + if (this.lintString == null) { + sb.append("null"); + } else { + sb.append(this.lintString); + } + first = false; + if (!first) sb.append(", "); + sb.append("mStringString:"); + if (this.mStringString == null) { + sb.append("null"); + } else { + sb.append(this.mStringString); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java new file mode 100644 index 0000000..65dab7e --- /dev/null +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java @@ -0,0 +1,475 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde2.thrift.test; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class IntString implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("IntString"); + + private static final TField MYINT_FIELD_DESC = new TField("myint", TType.I32, (short)1); + private static final TField MY_STRING_FIELD_DESC = new TField("myString", TType.STRING, (short)2); + private static final TField UNDERSCORE_INT_FIELD_DESC = new TField("underscore_int", TType.I32, (short)3); + + private int myint; + private String myString; + private int underscore_int; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + MYINT((short)1, "myint"), + MY_STRING((short)2, "myString"), + UNDERSCORE_INT((short)3, "underscore_int"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MYINT + return MYINT; + case 2: // MY_STRING + return MY_STRING; + case 3: // UNDERSCORE_INT + return UNDERSCORE_INT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MYINT_ISSET_ID = 0; + private static final int __UNDERSCORE_INT_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.MY_STRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap); + } + + public IntString() { + } + + public IntString( + int myint, + String myString, + int underscore_int) + { + this(); + this.myint = myint; + setMyintIsSet(true); + this.myString = myString; + this.underscore_int = underscore_int; + setUnderscore_intIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public IntString(IntString other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.myint = other.myint; + if (other.isSetMyString()) { + this.myString = other.myString; + } + this.underscore_int = other.underscore_int; + } + + public IntString deepCopy() { + return new IntString(this); + } + + @Override + public void clear() { + setMyintIsSet(false); + this.myint = 0; + this.myString = null; + setUnderscore_intIsSet(false); + this.underscore_int = 0; + } + + public int getMyint() { + return this.myint; + } + + public void setMyint(int myint) { + this.myint = myint; + setMyintIsSet(true); + } + + public void unsetMyint() { + __isset_bit_vector.clear(__MYINT_ISSET_ID); + } + + /** Returns true if field myint is set (has been asigned a value) and false otherwise */ + public boolean isSetMyint() { + return __isset_bit_vector.get(__MYINT_ISSET_ID); + } + + public void setMyintIsSet(boolean value) { + __isset_bit_vector.set(__MYINT_ISSET_ID, value); + } + + public String getMyString() { + return this.myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public void unsetMyString() { + this.myString = null; + } + + /** Returns true if field myString is set (has been asigned a value) and false otherwise */ + public boolean isSetMyString() { + return this.myString != null; + } + + public void setMyStringIsSet(boolean value) { + if (!value) { + this.myString = null; + } + } + + public int getUnderscore_int() { + return this.underscore_int; + } + + public void setUnderscore_int(int underscore_int) { + this.underscore_int = underscore_int; + setUnderscore_intIsSet(true); + } + + public void unsetUnderscore_int() { + __isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID); + } + + /** Returns true if field underscore_int is set (has been asigned a value) and false otherwise */ + public boolean isSetUnderscore_int() { + return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID); + } + + public void setUnderscore_intIsSet(boolean value) { + __isset_bit_vector.set(__UNDERSCORE_INT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MYINT: + if (value == null) { + unsetMyint(); + } else { + setMyint((Integer)value); + } + break; + + case MY_STRING: + if (value == null) { + unsetMyString(); + } else { + setMyString((String)value); + } + break; + + case UNDERSCORE_INT: + if (value == null) { + unsetUnderscore_int(); + } else { + setUnderscore_int((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MYINT: + return new Integer(getMyint()); + + case MY_STRING: + return getMyString(); + + case UNDERSCORE_INT: + return new Integer(getUnderscore_int()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MYINT: + return isSetMyint(); + case MY_STRING: + return isSetMyString(); + case UNDERSCORE_INT: + return isSetUnderscore_int(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IntString) + return this.equals((IntString)that); + return false; + } + + public boolean equals(IntString that) { + if (that == null) + return false; + + boolean this_present_myint = true; + boolean that_present_myint = true; + if (this_present_myint || that_present_myint) { + if (!(this_present_myint && that_present_myint)) + return false; + if (this.myint != that.myint) + return false; + } + + boolean this_present_myString = true && this.isSetMyString(); + boolean that_present_myString = true && that.isSetMyString(); + if (this_present_myString || that_present_myString) { + if (!(this_present_myString && that_present_myString)) + return false; + if (!this.myString.equals(that.myString)) + return false; + } + + boolean this_present_underscore_int = true; + boolean that_present_underscore_int = true; + if (this_present_underscore_int || that_present_underscore_int) { + if (!(this_present_underscore_int && that_present_underscore_int)) + return false; + if (this.underscore_int != that.underscore_int) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(IntString other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IntString typedOther = (IntString)other; + + lastComparison = Boolean.valueOf(isSetMyint()).compareTo(typedOther.isSetMyint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMyint()) { + lastComparison = TBaseHelper.compareTo(this.myint, typedOther.myint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMyString()).compareTo(typedOther.isSetMyString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMyString()) { + lastComparison = TBaseHelper.compareTo(this.myString, typedOther.myString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUnderscore_int()).compareTo(typedOther.isSetUnderscore_int()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnderscore_int()) { + lastComparison = TBaseHelper.compareTo(this.underscore_int, typedOther.underscore_int); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MYINT + if (field.type == TType.I32) { + this.myint = iprot.readI32(); + setMyintIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MY_STRING + if (field.type == TType.STRING) { + this.myString = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // UNDERSCORE_INT + if (field.type == TType.I32) { + this.underscore_int = iprot.readI32(); + setUnderscore_intIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MYINT_FIELD_DESC); + oprot.writeI32(this.myint); + oprot.writeFieldEnd(); + if (this.myString != null) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(this.myString); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); + oprot.writeI32(this.underscore_int); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("IntString("); + boolean first = true; + + sb.append("myint:"); + sb.append(this.myint); + first = false; + if (!first) sb.append(", "); + sb.append("myString:"); + if (this.myString == null) { + sb.append("null"); + } else { + sb.append(this.myString); + } + first = false; + if (!first) sb.append(", "); + sb.append("underscore_int:"); + sb.append(this.underscore_int); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen/thrift/gen-php/serde/serde_constants.php serde/src/gen/thrift/gen-php/serde/serde_constants.php new file mode 100644 index 0000000..b889487 --- /dev/null +++ serde/src/gen/thrift/gen-php/serde/serde_constants.php @@ -0,0 +1,95 @@ + true, + "boolean" => true, + "tinyint" => true, + "smallint" => true, + "int" => true, + "bigint" => true, + "float" => true, + "double" => true, + "string" => true, + "date" => true, + "datetime" => true, + "timestamp" => true, +); + +$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array( + "array" => true, + "map" => true, +); + +?> diff --git serde/src/gen/thrift/gen-php/serde/serde_types.php serde/src/gen/thrift/gen-php/serde/serde_types.php new file mode 100644 index 0000000..e7a2275 --- /dev/null +++ serde/src/gen/thrift/gen-php/serde/serde_types.php @@ -0,0 +1,10 @@ + diff --git serde/src/gen/thrift/gen-py/__init__.py serde/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/__init__.py serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] diff --git serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py new file mode 100644 index 0000000..50782d1 --- /dev/null +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py @@ -0,0 +1,59 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +from ttypes import * + +SERIALIZATION_LIB = "serialization.lib" +SERIALIZATION_CLASS = "serialization.class" +SERIALIZATION_FORMAT = "serialization.format" +SERIALIZATION_DDL = "serialization.ddl" +SERIALIZATION_NULL_FORMAT = "serialization.null.format" +SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest" +SERIALIZATION_SORT_ORDER = "serialization.sort.order" +SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object" +FIELD_DELIM = "field.delim" +COLLECTION_DELIM = "colelction.delim" +LINE_DELIM = "line.delim" +MAPKEY_DELIM = "mapkey.delim" +QUOTE_CHAR = "quote.delim" +ESCAPE_CHAR = "escape.delim" +VOID_TYPE_NAME = "void" +BOOLEAN_TYPE_NAME = "boolean" +TINYINT_TYPE_NAME = "tinyint" +SMALLINT_TYPE_NAME = "smallint" +INT_TYPE_NAME = "int" +BIGINT_TYPE_NAME = "bigint" +FLOAT_TYPE_NAME = "float" +DOUBLE_TYPE_NAME = "double" +STRING_TYPE_NAME = "string" +DATE_TYPE_NAME = "date" +DATETIME_TYPE_NAME = "datetime" +TIMESTAMP_TYPE_NAME = "timestamp" +LIST_TYPE_NAME = "array" +MAP_TYPE_NAME = "map" +STRUCT_TYPE_NAME = "struct" +UNION_TYPE_NAME = "uniontype" +LIST_COLUMNS = "columns" +LIST_COLUMN_TYPES = "columns.types" +PrimitiveTypes = set([ + "void", + "boolean", + "tinyint", + "smallint", + "int", + "bigint", + "float", + "double", + "string", + "date", + "datetime", + "timestamp", +]) +CollectionTypes = set([ + "array", + "map", +]) diff --git serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py new file mode 100644 index 0000000..b9cea2c --- /dev/null +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py @@ -0,0 +1,16 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + diff --git serde/src/gen/thrift/gen-rb/serde_constants.rb serde/src/gen/thrift/gen-rb/serde_constants.rb new file mode 100644 index 0000000..28dd381 --- /dev/null +++ serde/src/gen/thrift/gen-rb/serde_constants.rb @@ -0,0 +1,92 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'serde_types' + +SERIALIZATION_LIB = %q"serialization.lib" + +SERIALIZATION_CLASS = %q"serialization.class" + +SERIALIZATION_FORMAT = %q"serialization.format" + +SERIALIZATION_DDL = %q"serialization.ddl" + +SERIALIZATION_NULL_FORMAT = %q"serialization.null.format" + +SERIALIZATION_LAST_COLUMN_TAKES_REST = %q"serialization.last.column.takes.rest" + +SERIALIZATION_SORT_ORDER = %q"serialization.sort.order" + +SERIALIZATION_USE_JSON_OBJECTS = %q"serialization.use.json.object" + +FIELD_DELIM = %q"field.delim" + +COLLECTION_DELIM = %q"colelction.delim" + +LINE_DELIM = %q"line.delim" + +MAPKEY_DELIM = %q"mapkey.delim" + +QUOTE_CHAR = %q"quote.delim" + +ESCAPE_CHAR = %q"escape.delim" + +VOID_TYPE_NAME = %q"void" + +BOOLEAN_TYPE_NAME = %q"boolean" + +TINYINT_TYPE_NAME = %q"tinyint" + +SMALLINT_TYPE_NAME = %q"smallint" + +INT_TYPE_NAME = %q"int" + +BIGINT_TYPE_NAME = %q"bigint" + +FLOAT_TYPE_NAME = %q"float" + +DOUBLE_TYPE_NAME = %q"double" + +STRING_TYPE_NAME = %q"string" + +DATE_TYPE_NAME = %q"date" + +DATETIME_TYPE_NAME = %q"datetime" + +TIMESTAMP_TYPE_NAME = %q"timestamp" + +LIST_TYPE_NAME = %q"array" + +MAP_TYPE_NAME = %q"map" + +STRUCT_TYPE_NAME = %q"struct" + +UNION_TYPE_NAME = %q"uniontype" + +LIST_COLUMNS = %q"columns" + +LIST_COLUMN_TYPES = %q"columns.types" + +PrimitiveTypes = Set.new([ + %q"void", + %q"boolean", + %q"tinyint", + %q"smallint", + %q"int", + %q"bigint", + %q"float", + %q"double", + %q"string", + %q"date", + %q"datetime", + %q"timestamp", +]) + +CollectionTypes = Set.new([ + %q"array", + %q"map", +]) + diff --git serde/src/gen/thrift/gen-rb/serde_types.rb serde/src/gen/thrift/gen-rb/serde_types.rb new file mode 100644 index 0000000..d5b1654 --- /dev/null +++ serde/src/gen/thrift/gen-rb/serde_types.rb @@ -0,0 +1,7 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + + diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java index 961c24f..2a4d0b7 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java @@ -19,6 +19,7 @@ package org.apache.hadoop.hive.serde2.thrift; import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Properties; @@ -345,12 +346,39 @@ public class TBinarySortableProtocol extends TProtocol implements } @Override + public void writeBinary(ByteBuffer bin) throws TException { + if (bin == null) { + writeRawBytes(nullByte, 0, 1); + return; + } + + int length = bin.limit() - bin.position() - bin.arrayOffset(); + if (bin.hasArray()) { + writeBinary(bin.array(), bin.arrayOffset() + bin.position(), + length); + } else { + byte []copy = new byte[length]; + bin.get(copy); + writeBinary(copy); + } + } + public void writeBinary(byte[] bin) throws TException { if (bin == null) { writeRawBytes(nullByte, 0, 1); } else { - writeI32(bin.length); - writeRawBytes(bin, 0, bin.length); + writeBinary(bin, 0, bin.length); + } + } + + + public void writeBinary(byte[] bin, int offset, int length) + throws TException { + if (bin == null) { + writeRawBytes(nullByte, 0, 1); + } else { + writeI32(length); + writeRawBytes(bin, offset, length); } } @@ -612,14 +640,14 @@ public class TBinarySortableProtocol extends TProtocol implements } @Override - public byte[] readBinary() throws TException { + public ByteBuffer readBinary() throws TException { int size = readI32(); if (lastPrimitiveWasNull) { return null; } byte[] buf = new byte[size]; readRawAll(buf, 0, size); - return buf; + return ByteBuffer.wrap(buf); } boolean lastPrimitiveWasNull; diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java index e781a06..0e26f23 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; @@ -239,6 +240,10 @@ public class TCTLSeparatedProtocol extends TProtocol implements } tokenizer = new StringTokenizer(row, separator, true); } catch (TTransportException e) { + if(e.getType() == TTransportException.END_OF_FILE){ + tokenizer = new StringTokenizer("", separator, true); + return false; + } e.printStackTrace(); tokenizer = null; return false; @@ -605,7 +610,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 +843,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 serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java index 4bdcf88..a18f4a7 100644 --- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java +++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestObjectInspectorUtils.java @@ -56,15 +56,15 @@ public class TestObjectInspectorUtils extends TestCase { // real object Complex cc = new Complex(); - cc.aint = 1; - cc.aString = "test"; + cc.setAint(1); + cc.setAString("test"); List c2 = Arrays.asList(new Integer[] {1, 2, 3}); - cc.lint = c2; + cc.setLint(c2); List c3 = Arrays.asList(new String[] {"one", "two"}); - cc.lString = c3; + cc.setLString(c3); List c4 = new ArrayList(); - cc.lintString = c4; - cc.mStringString = null; + cc.setLintString(c4); + cc.setMStringString(null); // standard object Object c = ObjectInspectorUtils.copyToStandardObject(cc, oi1); diff --git serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java index 99b0e90..5f692fb 100644 --- serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java +++ serde/src/test/org/apache/hadoop/hive/serde2/objectinspector/TestThriftObjectInspectors.java @@ -59,15 +59,15 @@ public class TestThriftObjectInspectors extends TestCase { // real object Complex c = new Complex(); - c.aint = 1; - c.aString = "test"; + c.setAint(1); + c.setAString("test"); List c2 = Arrays.asList(new Integer[] {1, 2, 3}); - c.lint = c2; + c.setLint(c2); List c3 = Arrays.asList(new String[] {"one", "two"}); - c.lString = c3; + c.setLString(c3); List c4 = new ArrayList(); - c.lintString = c4; - c.mStringString = null; + c.setLintString(c4); + c.setMStringString(null); assertEquals(1, soi.getStructFieldData(c, fields.get(0))); assertEquals("test", soi.getStructFieldData(c, fields.get(1))); diff --git service/build.xml service/build.xml index ffd1854..3c54625 100644 --- service/build.xml +++ service/build.xml @@ -26,7 +26,6 @@ - @@ -41,17 +40,18 @@ - - Executing thrift (which needs to be in your path) on if/hive_service.thrift - - + + You must set the 'thrift.home' property! + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_service.thrift + + -#else -#include -#endif - -#ifdef HAVE_STDINT_H -#include -#endif - -/** - * T_GLOBAL_DEBUGGING_LEVEL = 0: all debugging turned off, debug macros undefined - * T_GLOBAL_DEBUGGING_LEVEL = 1: all debugging turned on - */ -#define T_GLOBAL_DEBUGGING_LEVEL 0 - - -/** - * T_GLOBAL_LOGGING_LEVEL = 0: all logging turned off, logging macros undefined - * T_GLOBAL_LOGGING_LEVEL = 1: all logging turned on - */ -#define T_GLOBAL_LOGGING_LEVEL 1 - - -/** - * Standard wrapper around fprintf what will prefix the file name and line - * number to the line. Uses T_GLOBAL_DEBUGGING_LEVEL to control whether it is - * turned on or off. - * - * @param format_string - */ -#if T_GLOBAL_DEBUGGING_LEVEL > 0 - #define T_DEBUG(format_string,...) \ - if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \ - fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \ - } -#else - #define T_DEBUG(format_string,...) -#endif - - -/** - * analagous to T_DEBUG but also prints the time - * - * @param string format_string input: printf style format string - */ -#if T_GLOBAL_DEBUGGING_LEVEL > 0 - #define T_DEBUG_T(format_string,...) \ - { \ - if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - } \ - } -#else - #define T_DEBUG_T(format_string,...) -#endif - - -/** - * analagous to T_DEBUG but uses input level to determine whether or not the string - * should be logged. - * - * @param int level: specified debug level - * @param string format_string input: format string - */ -#define T_DEBUG_L(level, format_string,...) \ - if ((level) > 0) { \ - fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \ - } - - -/** - * Explicit error logging. Prints time, file name and line number - * - * @param string format_string input: printf style format string - */ -#define T_ERROR(format_string,...) \ - { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] ERROR: " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - } - - -/** - * Analagous to T_ERROR, additionally aborting the process. - * WARNING: macro calls abort(), ending program execution - * - * @param string format_string input: printf style format string - */ -#define T_ERROR_ABORT(format_string,...) \ - { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] ERROR: Going to abort " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - exit(1); \ - } - - -/** - * Log input message - * - * @param string format_string input: printf style format string - */ -#if T_GLOBAL_LOGGING_LEVEL > 0 - #define T_LOG_OPER(format_string,...) \ - { \ - if (T_GLOBAL_LOGGING_LEVEL > 0) { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s] " #format_string " \n", dbgtime,##__VA_ARGS__); \ - } \ - } -#else - #define T_LOG_OPER(format_string,...) -#endif - -#endif // #ifndef _THRIFT_TLOGGING_H_ diff --git service/include/thrift/TProcessor.h service/include/thrift/TProcessor.h deleted file mode 100644 index f2d5279..0000000 --- service/include/thrift/TProcessor.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TPROCESSOR_H_ -#define _THRIFT_TPROCESSOR_H_ 1 - -#include -#include -#include - -namespace apache { namespace thrift { - -/** - * A processor is a generic object that acts upon two streams of data, one - * an input and the other an output. The definition of this object is loose, - * though the typical case is for some sort of server that either generates - * responses to an input stream or forwards data from one pipe onto another. - * - */ -class TProcessor { - public: - virtual ~TProcessor() {} - - virtual bool process(boost::shared_ptr in, - boost::shared_ptr out) = 0; - - bool process(boost::shared_ptr io) { - return process(io, io); - } - - protected: - TProcessor() {} -}; - -}} // apache::thrift - -#endif // #ifndef _THRIFT_PROCESSOR_H_ diff --git service/include/thrift/TReflectionLocal.h service/include/thrift/TReflectionLocal.h deleted file mode 100644 index e83e475..0000000 --- service/include/thrift/TReflectionLocal.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TREFLECTIONLOCAL_H_ -#define _THRIFT_TREFLECTIONLOCAL_H_ 1 - -#include -#include -#include - -/** - * Local Reflection is a blanket term referring to the the structure - * and generation of this particular representation of Thrift types. - * (It is called local because it cannot be serialized by Thrift). - * - */ - -namespace apache { namespace thrift { namespace reflection { namespace local { - -using apache::thrift::protocol::TType; - -// We include this many bytes of the structure's fingerprint when serializing -// a top-level structure. Long enough to make collisions unlikely, short -// enough to not significantly affect the amount of memory used. -const int FP_PREFIX_LEN = 4; - -struct FieldMeta { - int16_t tag; - bool is_optional; -}; - -struct TypeSpec { - TType ttype; - uint8_t fp_prefix[FP_PREFIX_LEN]; - - // Use an anonymous union here so we can fit two TypeSpecs in one cache line. - union { - struct { - // Use parallel arrays here for denser packing (of the arrays). - FieldMeta* metas; - TypeSpec** specs; - } tstruct; - struct { - TypeSpec *subtype1; - TypeSpec *subtype2; - } tcontainer; - }; - - // Static initialization of unions isn't really possible, - // so take the plunge and use constructors. - // Hopefully they'll be evaluated at compile time. - - TypeSpec(TType ttype) : ttype(ttype) { - std::memset(fp_prefix, 0, FP_PREFIX_LEN); - } - - TypeSpec(TType ttype, - const uint8_t* fingerprint, - FieldMeta* metas, - TypeSpec** specs) : - ttype(ttype) - { - std::memcpy(fp_prefix, fingerprint, FP_PREFIX_LEN); - tstruct.metas = metas; - tstruct.specs = specs; - } - - TypeSpec(TType ttype, TypeSpec* subtype1, TypeSpec* subtype2) : - ttype(ttype) - { - std::memset(fp_prefix, 0, FP_PREFIX_LEN); - tcontainer.subtype1 = subtype1; - tcontainer.subtype2 = subtype2; - } - -}; - -}}}} // apache::thrift::reflection::local - -#endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_ diff --git service/include/thrift/Thrift.h service/include/thrift/Thrift.h deleted file mode 100644 index 27a6476..0000000 --- service/include/thrift/Thrift.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_THRIFT_H_ -#define _THRIFT_THRIFT_H_ 1 - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include - -#include -#include -#ifdef HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include - -#include "TLogging.h" - -namespace apache { namespace thrift { - -class TOutput { - public: - TOutput() : f_(&errorTimeWrapper) {} - - inline void setOutputFunction(void (*function)(const char *)){ - f_ = function; - } - - inline void operator()(const char *message){ - f_(message); - } - - // It is important to have a const char* overload here instead of - // just the string version, otherwise errno could be corrupted - // if there is some problem allocating memory when constructing - // the string. - void perror(const char *message, int errno_copy); - inline void perror(const std::string &message, int errno_copy) { - perror(message.c_str(), errno_copy); - } - - void printf(const char *message, ...); - - inline static void errorTimeWrapper(const char* msg) { - time_t now; - char dbgtime[26]; - time(&now); - ctime_r(&now, dbgtime); - dbgtime[24] = 0; - fprintf(stderr, "Thrift: %s %s\n", dbgtime, msg); - } - - /** Just like strerror_r but returns a C++ string object. */ - static std::string strerror_s(int errno_copy); - - private: - void (*f_)(const char *); -}; - -extern TOutput GlobalOutput; - -namespace protocol { - class TProtocol; -} - -class TException : public std::exception { - public: - TException() {} - - TException(const std::string& message) : - message_(message) {} - - virtual ~TException() throw() {} - - virtual const char* what() const throw() { - if (message_.empty()) { - return "Default TException."; - } else { - return message_.c_str(); - } - } - - protected: - std::string message_; - -}; - -class TApplicationException : public TException { - public: - - /** - * Error codes for the various types of exceptions. - */ - enum TApplicationExceptionType - { UNKNOWN = 0 - , UNKNOWN_METHOD = 1 - , INVALID_MESSAGE_TYPE = 2 - , WRONG_METHOD_NAME = 3 - , BAD_SEQUENCE_ID = 4 - , MISSING_RESULT = 5 - }; - - TApplicationException() : - TException(), - type_(UNKNOWN) {} - - TApplicationException(TApplicationExceptionType type) : - TException(), - type_(type) {} - - TApplicationException(const std::string& message) : - TException(message), - type_(UNKNOWN) {} - - TApplicationException(TApplicationExceptionType type, - const std::string& message) : - TException(message), - type_(type) {} - - virtual ~TApplicationException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TApplicationExceptionType getType() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TApplicationException: Unknown application exception"; - case UNKNOWN_METHOD : return "TApplicationException: Unknown method"; - case INVALID_MESSAGE_TYPE : return "TApplicationException: Invalid message type"; - case WRONG_METHOD_NAME : return "TApplicationException: Wrong method name"; - case BAD_SEQUENCE_ID : return "TApplicationException: Bad sequence identifier"; - case MISSING_RESULT : return "TApplicationException: Missing result"; - default : return "TApplicationException: (Invalid exception type)"; - }; - } else { - return message_.c_str(); - } - } - - uint32_t read(protocol::TProtocol* iprot); - uint32_t write(protocol::TProtocol* oprot) const; - - protected: - /** - * Error code - */ - TApplicationExceptionType type_; - -}; - - -// Forward declare this structure used by TDenseProtocol -namespace reflection { namespace local { -struct TypeSpec; -}} - - -}} // apache::thrift - -#endif // #ifndef _THRIFT_THRIFT_H_ diff --git service/include/thrift/concurrency/Exception.h service/include/thrift/concurrency/Exception.h deleted file mode 100644 index ec46629..0000000 --- service/include/thrift/concurrency/Exception.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ -#define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1 - -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -class NoSuchTaskException : public apache::thrift::TException {}; - -class UncancellableTaskException : public apache::thrift::TException {}; - -class InvalidArgumentException : public apache::thrift::TException {}; - -class IllegalStateException : public apache::thrift::TException {}; - -class TimedOutException : public apache::thrift::TException { -public: - TimedOutException():TException("TimedOutException"){}; - TimedOutException(const std::string& message ) : - TException(message) {} -}; - -class TooManyPendingTasksException : public apache::thrift::TException { -public: - TooManyPendingTasksException():TException("TooManyPendingTasksException"){}; - TooManyPendingTasksException(const std::string& message ) : - TException(message) {} -}; - -class SystemResourceException : public apache::thrift::TException { -public: - SystemResourceException() {} - - SystemResourceException(const std::string& message) : - TException(message) {} -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ diff --git service/include/thrift/concurrency/FunctionRunner.h service/include/thrift/concurrency/FunctionRunner.h deleted file mode 100644 index 2216927..0000000 --- service/include/thrift/concurrency/FunctionRunner.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H -#define _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H 1 - -#include -#include "thrift/lib/cpp/concurrency/Thread.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Convenient implementation of Runnable that will execute arbitrary callbacks. - * Interfaces are provided to accept both a generic 'void(void)' callback, and - * a 'void* (void*)' pthread_create-style callback. - * - * Example use: - * void* my_thread_main(void* arg); - * shared_ptr factory = ...; - * shared_ptr thread = - * factory->newThread(shared_ptr( - * new FunctionRunner(my_thread_main, some_argument))); - * thread->start(); - * - * - */ - -class FunctionRunner : public Runnable { - public: - // This is the type of callback 'pthread_create()' expects. - typedef void* (*PthreadFuncPtr)(void *arg); - // This a fully-generic void(void) callback for custom bindings. - typedef std::tr1::function VoidFunc; - - /** - * Given a 'pthread_create' style callback, this FunctionRunner will - * execute the given callback. Note that the 'void*' return value is ignored. - */ - FunctionRunner(PthreadFuncPtr func, void* arg) - : func_(std::tr1::bind(func, arg)) - { } - - /** - * Given a generic callback, this FunctionRunner will execute it. - */ - FunctionRunner(const VoidFunc& cob) - : func_(cob) - { } - - - void run() { - func_(); - } - - private: - VoidFunc func_; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H diff --git service/include/thrift/concurrency/Monitor.h service/include/thrift/concurrency/Monitor.h deleted file mode 100644 index 234bf32..0000000 --- service/include/thrift/concurrency/Monitor.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_MONITOR_H_ -#define _THRIFT_CONCURRENCY_MONITOR_H_ 1 - -#include "Exception.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A monitor is a combination mutex and condition-event. Waiting and - * notifying condition events requires that the caller own the mutex. Mutex - * lock and unlock operations can be performed independently of condition - * events. This is more or less analogous to java.lang.Object multi-thread - * operations - * - * Note that all methods are const. Monitors implement logical constness, not - * bit constness. This allows const methods to call monitor methods without - * needing to cast away constness or change to non-const signatures. - * - * @version $Id:$ - */ -class Monitor { - - public: - - Monitor(); - - virtual ~Monitor(); - - virtual void lock() const; - - virtual void unlock() const; - - virtual void wait(int64_t timeout=0LL) const; - - virtual void notify() const; - - virtual void notifyAll() const; - - private: - - class Impl; - - Impl* impl_; -}; - -class Synchronized { - public: - - Synchronized(const Monitor& value) : - monitor_(value) { - monitor_.lock(); - } - - ~Synchronized() { - monitor_.unlock(); - } - - private: - const Monitor& monitor_; -}; - - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_ diff --git service/include/thrift/concurrency/Mutex.h service/include/thrift/concurrency/Mutex.h deleted file mode 100644 index 73c73e0..0000000 --- service/include/thrift/concurrency/Mutex.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_MUTEX_H_ -#define _THRIFT_CONCURRENCY_MUTEX_H_ 1 - -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A simple mutex class - * - * @version $Id:$ - */ -class Mutex { - public: - typedef void (*Initializer)(void*); - - Mutex(Initializer init = DEFAULT_INITIALIZER); - virtual ~Mutex() {} - virtual void lock() const; - virtual bool trylock() const; - virtual void unlock() const; - - static void DEFAULT_INITIALIZER(void*); - static void ADAPTIVE_INITIALIZER(void*); - static void RECURSIVE_INITIALIZER(void*); - - private: - - class impl; - boost::shared_ptr impl_; -}; - -class ReadWriteMutex { -public: - ReadWriteMutex(); - virtual ~ReadWriteMutex() {} - - // these get the lock and block until it is done successfully - virtual void acquireRead() const; - virtual void acquireWrite() const; - - // these attempt to get the lock, returning false immediately if they fail - virtual bool attemptRead() const; - virtual bool attemptWrite() const; - - // this releases both read and write locks - virtual void release() const; - -private: - - class impl; - boost::shared_ptr impl_; -}; - -class Guard { - public: - Guard(const Mutex& value) : mutex_(value) { - mutex_.lock(); - } - ~Guard() { - mutex_.unlock(); - } - - private: - const Mutex& mutex_; -}; - -class RWGuard { - public: - RWGuard(const ReadWriteMutex& value, bool write = 0) : rw_mutex_(value) { - if (write) { - rw_mutex_.acquireWrite(); - } else { - rw_mutex_.acquireRead(); - } - } - ~RWGuard() { - rw_mutex_.release(); - } - private: - const ReadWriteMutex& rw_mutex_; -}; - - -// A little hack to prevent someone from trying to do "Guard(m);" -// Such a use is invalid because the temporary Guard object is -// destoryed at the end of the line, releasing the lock. -// Sorry for polluting the global namespace, but I think it's worth it. -#define Guard(m) incorrect_use_of_Guard(m) -#define RWGuard(m) incorrect_use_of_RWGuard(m) - - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_ diff --git service/include/thrift/concurrency/PosixThreadFactory.h service/include/thrift/concurrency/PosixThreadFactory.h deleted file mode 100644 index d6d83a3..0000000 --- service/include/thrift/concurrency/PosixThreadFactory.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ -#define _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ 1 - -#include "Thread.h" - -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A thread factory to create posix threads - * - * @version $Id:$ - */ -class PosixThreadFactory : public ThreadFactory { - - public: - - /** - * POSIX Thread scheduler policies - */ - enum POLICY { - OTHER, - FIFO, - ROUND_ROBIN - }; - - /** - * POSIX Thread scheduler relative priorities, - * - * Absolute priority is determined by scheduler policy and OS. This - * enumeration specifies relative priorities such that one can specify a - * priority withing a giving scheduler policy without knowing the absolute - * value of the priority. - */ - enum PRIORITY { - LOWEST = 0, - LOWER = 1, - LOW = 2, - NORMAL = 3, - HIGH = 4, - HIGHER = 5, - HIGHEST = 6, - INCREMENT = 7, - DECREMENT = 8 - }; - - /** - * Posix thread (pthread) factory. All threads created by a factory are reference-counted - * via boost::shared_ptr and boost::weak_ptr. The factory guarantees that threads and - * the Runnable tasks they host will be properly cleaned up once the last strong reference - * to both is given up. - * - * Threads are created with the specified policy, priority, stack-size and detachable-mode - * detached means the thread is free-running and will release all system resources the - * when it completes. A detachable thread is not joinable. The join method - * of a detachable thread will return immediately with no error. - * - * By default threads are not joinable. - */ - - PosixThreadFactory(POLICY policy=ROUND_ROBIN, PRIORITY priority=NORMAL, int stackSize=1, bool detached=true); - - // From ThreadFactory; - boost::shared_ptr newThread(boost::shared_ptr runnable) const; - - // From ThreadFactory; - Thread::id_t getCurrentThreadId() const; - - /** - * Gets stack size for created threads - * - * @return int size in megabytes - */ - virtual int getStackSize() const; - - /** - * Sets stack size for created threads - * - * @param value size in megabytes - */ - virtual void setStackSize(int value); - - /** - * Gets priority relative to current policy - */ - virtual PRIORITY getPriority() const; - - /** - * Sets priority relative to current policy - */ - virtual void setPriority(PRIORITY priority); - - /** - * Sets detached mode of threads - */ - virtual void setDetached(bool detached); - - /** - * Gets current detached mode - */ - virtual bool isDetached() const; - - private: - class Impl; - boost::shared_ptr impl_; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ diff --git service/include/thrift/concurrency/Thread.h service/include/thrift/concurrency/Thread.h deleted file mode 100644 index d4282ad..0000000 --- service/include/thrift/concurrency/Thread.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_THREAD_H_ -#define _THRIFT_CONCURRENCY_THREAD_H_ 1 - -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -class Thread; - -/** - * Minimal runnable class. More or less analogous to java.lang.Runnable. - * - * @version $Id:$ - */ -class Runnable { - - public: - virtual ~Runnable() {}; - virtual void run() = 0; - - /** - * Gets the thread object that is hosting this runnable object - can return - * an empty boost::shared pointer if no references remain on thet thread object - */ - virtual boost::shared_ptr thread() { return thread_.lock(); } - - /** - * Sets the thread that is executing this object. This is only meant for - * use by concrete implementations of Thread. - */ - virtual void thread(boost::shared_ptr value) { thread_ = value; } - - private: - boost::weak_ptr thread_; -}; - -/** - * Minimal thread class. Returned by thread factory bound to a Runnable object - * and ready to start execution. More or less analogous to java.lang.Thread - * (minus all the thread group, priority, mode and other baggage, since that - * is difficult to abstract across platforms and is left for platform-specific - * ThreadFactory implemtations to deal with - * - * @see apache::thrift::concurrency::ThreadFactory) - */ -class Thread { - - public: - - typedef uint64_t id_t; - - virtual ~Thread() {}; - - /** - * Starts the thread. Does platform specific thread creation and - * configuration then invokes the run method of the Runnable object bound - * to this thread. - */ - virtual void start() = 0; - - /** - * Join this thread. Current thread blocks until this target thread - * completes. - */ - virtual void join() = 0; - - /** - * Gets the thread's platform-specific ID - */ - virtual id_t getId() = 0; - - /** - * Gets the runnable object this thread is hosting - */ - virtual boost::shared_ptr runnable() const { return _runnable; } - - protected: - virtual void runnable(boost::shared_ptr value) { _runnable = value; } - - private: - boost::shared_ptr _runnable; - -}; - -/** - * Factory to create platform-specific thread object and bind them to Runnable - * object for execution - */ -class ThreadFactory { - - public: - virtual ~ThreadFactory() {} - virtual boost::shared_ptr newThread(boost::shared_ptr runnable) const = 0; - - /** Gets the current thread id or unknown_thread_id if the current thread is not a thrift thread */ - - static const Thread::id_t unknown_thread_id; - - virtual Thread::id_t getCurrentThreadId() const = 0; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_ diff --git service/include/thrift/concurrency/ThreadManager.h service/include/thrift/concurrency/ThreadManager.h deleted file mode 100644 index 6e5a178..0000000 --- service/include/thrift/concurrency/ThreadManager.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_ -#define _THRIFT_CONCURRENCY_THREADMANAGER_H_ 1 - -#include -#include -#include "Thread.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Thread Pool Manager and related classes - * - * @version $Id:$ - */ -class ThreadManager; - -/** - * ThreadManager class - * - * This class manages a pool of threads. It uses a ThreadFactory to create - * threads. It never actually creates or destroys worker threads, rather - * It maintains statistics on number of idle threads, number of active threads, - * task backlog, and average wait and service times and informs the PoolPolicy - * object bound to instances of this manager of interesting transitions. It is - * then up the PoolPolicy object to decide if the thread pool size needs to be - * adjusted and call this object addWorker and removeWorker methods to make - * changes. - * - * This design allows different policy implementations to used this code to - * handle basic worker thread management and worker task execution and focus on - * policy issues. The simplest policy, StaticPolicy, does nothing other than - * create a fixed number of threads. - */ -class ThreadManager { - - protected: - ThreadManager() {} - - public: - virtual ~ThreadManager() {} - - /** - * Starts the thread manager. Verifies all attributes have been properly - * initialized, then allocates necessary resources to begin operation - */ - virtual void start() = 0; - - /** - * Stops the thread manager. Aborts all remaining unprocessed task, shuts - * down all created worker threads, and realeases all allocated resources. - * This method blocks for all worker threads to complete, thus it can - * potentially block forever if a worker thread is running a task that - * won't terminate. - */ - virtual void stop() = 0; - - /** - * Joins the thread manager. This is the same as stop, except that it will - * block until all the workers have finished their work. At that point - * the ThreadManager will transition into the STOPPED state. - */ - virtual void join() = 0; - - enum STATE { - UNINITIALIZED, - STARTING, - STARTED, - JOINING, - STOPPING, - STOPPED - }; - - virtual const STATE state() const = 0; - - virtual boost::shared_ptr threadFactory() const = 0; - - virtual void threadFactory(boost::shared_ptr value) = 0; - - virtual void addWorker(size_t value=1) = 0; - - virtual void removeWorker(size_t value=1) = 0; - - /** - * Gets the current number of idle worker threads - */ - virtual size_t idleWorkerCount() const = 0; - - /** - * Gets the current number of total worker threads - */ - virtual size_t workerCount() const = 0; - - /** - * Gets the current number of pending tasks - */ - virtual size_t pendingTaskCount() const = 0; - - /** - * Gets the current number of pending and executing tasks - */ - virtual size_t totalTaskCount() const = 0; - - /** - * Gets the maximum pending task count. 0 indicates no maximum - */ - virtual size_t pendingTaskCountMax() const = 0; - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * This method will block if pendingTaskCountMax() in not zero and pendingTaskCount() - * is greater than or equalt to pendingTaskCountMax(). If this method is called in the - * context of a ThreadManager worker thread it will throw a - * TooManyPendingTasksException - * - * @param task The task to queue for execution - * - * @param timeout Time to wait in milliseconds to add a task when a pending-task-count - * is specified. Specific cases: - * timeout = 0 : Wait forever to queue task. - * timeout = -1 : Return immediately if pending task count exceeds specified max - * - * @throws TooManyPendingTasksException Pending task count exceeds max pending task count - */ - virtual void add(boost::shared_ptrtask, int64_t timeout=0LL) = 0; - - /** - * Removes a pending task - */ - virtual void remove(boost::shared_ptr task) = 0; - - static boost::shared_ptr newThreadManager(); - - /** - * Creates a simple thread manager the uses count number of worker threads and has - * a pendingTaskCountMax maximum pending tasks. The default, 0, specified no limit - * on pending tasks - */ - static boost::shared_ptr newSimpleThreadManager(size_t count=4, size_t pendingTaskCountMax=0); - - class Task; - - class Worker; - - class Impl; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_ diff --git service/include/thrift/concurrency/TimerManager.h service/include/thrift/concurrency/TimerManager.h deleted file mode 100644 index dfbf0ea..0000000 --- service/include/thrift/concurrency/TimerManager.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_ -#define _THRIFT_CONCURRENCY_TIMERMANAGER_H_ 1 - -#include "Exception.h" -#include "Monitor.h" -#include "Thread.h" - -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Timer Manager - * - * This class dispatches timer tasks when they fall due. - * - * @version $Id:$ - */ -class TimerManager { - - public: - - TimerManager(); - - virtual ~TimerManager(); - - virtual boost::shared_ptr threadFactory() const; - - virtual void threadFactory(boost::shared_ptr value); - - /** - * Starts the timer manager service - * - * @throws IllegalArgumentException Missing thread factory attribute - */ - virtual void start(); - - /** - * Stops the timer manager service - */ - virtual void stop(); - - virtual size_t taskCount() const ; - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * @param task The task to execute - * @param timeout Time in milliseconds to delay before executing task - */ - virtual void add(boost::shared_ptr task, int64_t timeout); - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * @param task The task to execute - * @param timeout Absolute time in the future to execute task. - */ - virtual void add(boost::shared_ptr task, const struct timespec& timeout); - - /** - * Removes a pending task - * - * @throws NoSuchTaskException Specified task doesn't exist. It was either - * processed already or this call was made for a - * task that was never added to this timer - * - * @throws UncancellableTaskException Specified task is already being - * executed or has completed execution. - */ - virtual void remove(boost::shared_ptr task); - - enum STATE { - UNINITIALIZED, - STARTING, - STARTED, - STOPPING, - STOPPED - }; - - virtual const STATE state() const; - - private: - boost::shared_ptr threadFactory_; - class Task; - friend class Task; - std::multimap > taskMap_; - size_t taskCount_; - Monitor monitor_; - STATE state_; - class Dispatcher; - friend class Dispatcher; - boost::shared_ptr dispatcher_; - boost::shared_ptr dispatcherThread_; - typedef std::multimap >::iterator task_iterator; - typedef std::pair task_range; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_ diff --git service/include/thrift/concurrency/Util.h service/include/thrift/concurrency/Util.h deleted file mode 100644 index 25fcc20..0000000 --- service/include/thrift/concurrency/Util.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_CONCURRENCY_UTIL_H_ -#define _THRIFT_CONCURRENCY_UTIL_H_ 1 - -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Utility methods - * - * This class contains basic utility methods for converting time formats, - * and other common platform-dependent concurrency operations. - * It should not be included in API headers for other concurrency library - * headers, since it will, by definition, pull in all sorts of horrid - * platform dependent crap. Rather it should be inluded directly in - * concurrency library implementation source. - * - * @version $Id:$ - */ -class Util { - - static const int64_t NS_PER_S = 1000000000LL; - static const int64_t US_PER_S = 1000000LL; - static const int64_t MS_PER_S = 1000LL; - - static const int64_t NS_PER_MS = NS_PER_S / MS_PER_S; - static const int64_t US_PER_MS = US_PER_S / MS_PER_S; - - public: - - /** - * Converts millisecond timestamp into a timespec struct - * - * @param struct timespec& result - * @param time or duration in milliseconds - */ - static void toTimespec(struct timespec& result, int64_t value) { - result.tv_sec = value / MS_PER_S; // ms to s - result.tv_nsec = (value % MS_PER_S) * NS_PER_MS; // ms to ns - } - - static void toTimeval(struct timeval& result, int64_t value) { - result.tv_sec = value / MS_PER_S; // ms to s - result.tv_usec = (value % MS_PER_S) * US_PER_MS; // ms to us - } - - /** - * Converts struct timespec to milliseconds - */ - static const void toMilliseconds(int64_t& result, const struct timespec& value) { - result = (value.tv_sec * MS_PER_S) + (value.tv_nsec / NS_PER_MS); - // round up -- int64_t cast is to avoid a compiler error for some GCCs - if (int64_t(value.tv_nsec) % NS_PER_MS >= (NS_PER_MS / 2)) { - ++result; - } - } - - /** - * Converts struct timeval to milliseconds - */ - static const void toMilliseconds(int64_t& result, const struct timeval& value) { - result = (value.tv_sec * MS_PER_S) + (value.tv_usec / US_PER_MS); - // round up -- int64_t cast is to avoid a compiler error for some GCCs - if (int64_t(value.tv_usec) % US_PER_MS >= (US_PER_MS / 2)) { - ++result; - } - } - - /** - * Get current time as milliseconds from epoch - */ - static const int64_t currentTime(); -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_ diff --git service/include/thrift/config.h service/include/thrift/config.h deleted file mode 100644 index 70264f2..0000000 --- service/include/thrift/config.h +++ /dev/null @@ -1,354 +0,0 @@ -/* config.h. Generated from config.hin by configure. */ -/* config.hin. Generated from configure.ac by autoheader. */ - -/* Define if the AI_ADDRCONFIG symbol is unavailable */ -/* #undef AI_ADDRCONFIG */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define ARITHMETIC_RIGHT_SHIFT 1 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* define if the Boost library is available */ -#define HAVE_BOOST /**/ - -/* Define to 1 if you have the `bzero' function. */ -#define HAVE_BZERO 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ENDIAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* define if libevent is available */ -#define HAVE_LIBEVENT /**/ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#define HAVE_LIBPTHREAD 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define HAVE_LIBRT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mkdir' function. */ -#define HAVE_MKDIR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#define HAVE_REALLOC 1 - -/* Define to 1 if you have the `realpath' function. */ -#define HAVE_REALPATH 1 - -/* Define to 1 if you have the `sched_get_priority_max' function. */ -#define HAVE_SCHED_GET_PRIORITY_MAX 1 - -/* Define to 1 if you have the `sched_get_priority_min' function. */ -#define HAVE_SCHED_GET_PRIORITY_MIN 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to 1 if `stat' has the bug that it succeeds when given the - zero-length file name argument. */ -/* #undef HAVE_STAT_EMPTY_STRING_BUG */ - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* define if zlib is available */ -/* #undef HAVE_ZLIB */ - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define LOGICAL_RIGHT_SHIFT 2 - -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing - slash. */ -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "thrift" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "thrift" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "thrift instant" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "thrift" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "instant" - -/* Define to the type of arg 1 for `select'. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#define SELECT_TYPE_ARG234 (fd_set *) - -/* Define to the type of arg 5 for `select'. */ -#define SELECT_TYPE_ARG5 (struct timeval *) - -/* Indicates the effect of the right shift operator on negative signed - integers */ -#define SIGNED_RIGHT_SHIFT_IS 1 - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -#define STRERROR_R_CHAR_P 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define UNKNOWN_RIGHT_SHIFT 3 - -/* Version number of package */ -#define VERSION "instant" - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to rpl_malloc if the replacement function should be used. */ -/* #undef malloc */ - -/* Define to `int' if does not define. */ -/* #undef mode_t */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to rpl_realloc if the replacement function should be used. */ -/* #undef realloc */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to `int' if does not define. */ -/* #undef ssize_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git service/include/thrift/fb303/FacebookBase.h service/include/thrift/fb303/FacebookBase.h deleted file mode 100644 index fd169e6..0000000 --- service/include/thrift/fb303/FacebookBase.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _FACEBOOK_TB303_FACEBOOKBASE_H_ -#define _FACEBOOK_TB303_FACEBOOKBASE_H_ 1 - -#include "FacebookService.h" - -#include "server/TServer.h" -#include "concurrency/Mutex.h" - -#include -#include -#include - -namespace facebook { namespace fb303 { - -using apache::thrift::concurrency::Mutex; -using apache::thrift::concurrency::ReadWriteMutex; -using apache::thrift::server::TServer; - -struct ReadWriteInt : ReadWriteMutex {int64_t value;}; -struct ReadWriteCounterMap : ReadWriteMutex, - std::map {}; - -/** - * Base Facebook service implementation in C++. - * - */ -class FacebookBase : virtual public FacebookServiceIf { - protected: - FacebookBase(std::string name); - virtual ~FacebookBase() {} - - public: - void getName(std::string& _return); - virtual void getVersion(std::string& _return) { _return = ""; } - - virtual fb_status getStatus() = 0; - virtual void getStatusDetails(std::string& _return) { _return = ""; } - - void setOption(const std::string& key, const std::string& value); - void getOption(std::string& _return, const std::string& key); - void getOptions(std::map & _return); - - int64_t aliveSince(); - - virtual void reinitialize() {} - - virtual void shutdown() { - if (server_.get() != NULL) { - server_->stop(); - } - } - - int64_t incrementCounter(const std::string& key, int64_t amount = 1); - int64_t setCounter(const std::string& key, int64_t value); - - void getCounters(std::map& _return); - int64_t getCounter(const std::string& key); - - /** - * Set server handle for shutdown method - */ - void setServer(boost::shared_ptr server) { - server_ = server; - } - - void getCpuProfile(std::string& _return, int32_t durSecs) { _return = ""; } - - private: - - std::string name_; - int64_t aliveSince_; - - std::map options_; - Mutex optionsLock_; - - ReadWriteCounterMap counters_; - - boost::shared_ptr server_; - -}; - -}} // facebook::tb303 - -#endif // _FACEBOOK_TB303_FACEBOOKBASE_H_ diff --git service/include/thrift/fb303/FacebookService.cpp service/include/thrift/fb303/FacebookService.cpp deleted file mode 100644 index 4a34362..0000000 --- service/include/thrift/fb303/FacebookService.cpp +++ /dev/null @@ -1,2887 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "FacebookService.h" - -namespace facebook { namespace fb303 { - -uint32_t FacebookService_getName_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getName_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getName_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getName_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getName_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getName_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getVersion_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getVersion_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getVersion_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatus_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatus_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I32) { - int32_t ecast0; - xfer += iprot->readI32(ecast0); - this->success = (fb_status)ecast0; - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getStatus_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32((int32_t)this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I32) { - int32_t ecast1; - xfer += iprot->readI32(ecast1); - (*(this->success)) = (fb_status)ecast1; - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounters_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounters_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size2; - apache::thrift::protocol::TType _ktype3; - apache::thrift::protocol::TType _vtype4; - iprot->readMapBegin(_ktype3, _vtype4, _size2); - uint32_t _i6; - for (_i6 = 0; _i6 < _size2; ++_i6) - { - std::string _key7; - xfer += iprot->readString(_key7); - int64_t& _val8 = this->success[_key7]; - xfer += iprot->readI64(_val8); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCounters_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_I64, this->success.size()); - std::map ::const_iterator _iter9; - for (_iter9 = this->success.begin(); _iter9 != this->success.end(); ++_iter9) - { - xfer += oprot->writeString(_iter9->first); - xfer += oprot->writeI64(_iter9->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size10; - apache::thrift::protocol::TType _ktype11; - apache::thrift::protocol::TType _vtype12; - iprot->readMapBegin(_ktype11, _vtype12, _size10); - uint32_t _i14; - for (_i14 = 0; _i14 < _size10; ++_i14) - { - std::string _key15; - xfer += iprot->readString(_key15); - int64_t& _val16 = (*(this->success))[_key15]; - xfer += iprot->readI64(_val16); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounter_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounter_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCounter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I64) { - xfer += iprot->readI64((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->value); - this->__isset.value = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_setOption_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("value", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->value); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_setOption_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("value", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->value))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_setOption_result"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOption_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOption_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getOption_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOptions_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOptions_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size17; - apache::thrift::protocol::TType _ktype18; - apache::thrift::protocol::TType _vtype19; - iprot->readMapBegin(_ktype18, _vtype19, _size17); - uint32_t _i21; - for (_i21 = 0; _i21 < _size17; ++_i21) - { - std::string _key22; - xfer += iprot->readString(_key22); - std::string& _val23 = this->success[_key22]; - xfer += iprot->readString(_val23); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getOptions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size()); - std::map ::const_iterator _iter24; - for (_iter24 = this->success.begin(); _iter24 != this->success.end(); ++_iter24) - { - xfer += oprot->writeString(_iter24->first); - xfer += oprot->writeString(_iter24->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size25; - apache::thrift::protocol::TType _ktype26; - apache::thrift::protocol::TType _vtype27; - iprot->readMapBegin(_ktype26, _vtype27, _size25); - uint32_t _i29; - for (_i29 = 0; _i29 < _size25; ++_i29) - { - std::string _key30; - xfer += iprot->readString(_key30); - std::string& _val31 = (*(this->success))[_key30]; - xfer += iprot->readString(_val31); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->profileDurationInSec); - this->__isset.profileDurationInSec = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_args"); - xfer += oprot->writeFieldBegin("profileDurationInSec", apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->profileDurationInSec); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_pargs"); - xfer += oprot->writeFieldBegin("profileDurationInSec", apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((*(this->profileDurationInSec))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_aliveSince_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_aliveSince_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_aliveSince_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_I64) { - xfer += iprot->readI64((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_reinitialize_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_reinitialize_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_reinitialize_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_reinitialize_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_reinitialize_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_shutdown_args::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_shutdown_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_shutdown_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_shutdown_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_shutdown_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void FacebookServiceClient::getName(std::string& _return) -{ - send_getName(); - recv_getName(_return); -} - -void FacebookServiceClient::send_getName() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getName", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getName_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getName(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getName") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getName_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getName failed: unknown result"); -} - -void FacebookServiceClient::getVersion(std::string& _return) -{ - send_getVersion(); - recv_getVersion(_return); -} - -void FacebookServiceClient::send_getVersion() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getVersion", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getVersion_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getVersion(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getVersion") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getVersion_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getVersion failed: unknown result"); -} - -fb_status FacebookServiceClient::getStatus() -{ - send_getStatus(); - return recv_getStatus(); -} - -void FacebookServiceClient::send_getStatus() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getStatus", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getStatus_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -fb_status FacebookServiceClient::recv_getStatus() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getStatus") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - fb_status _return; - FacebookService_getStatus_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getStatus failed: unknown result"); -} - -void FacebookServiceClient::getStatusDetails(std::string& _return) -{ - send_getStatusDetails(); - recv_getStatusDetails(_return); -} - -void FacebookServiceClient::send_getStatusDetails() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getStatusDetails_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getStatusDetails(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getStatusDetails") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getStatusDetails_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getStatusDetails failed: unknown result"); -} - -void FacebookServiceClient::getCounters(std::map & _return) -{ - send_getCounters(); - recv_getCounters(_return); -} - -void FacebookServiceClient::send_getCounters() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCounters", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCounters_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getCounters(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCounters") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getCounters_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCounters failed: unknown result"); -} - -int64_t FacebookServiceClient::getCounter(const std::string& key) -{ - send_getCounter(key); - return recv_getCounter(); -} - -void FacebookServiceClient::send_getCounter(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCounter", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCounter_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -int64_t FacebookServiceClient::recv_getCounter() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCounter") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - int64_t _return; - FacebookService_getCounter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCounter failed: unknown result"); -} - -void FacebookServiceClient::setOption(const std::string& key, const std::string& value) -{ - send_setOption(key, value); - recv_setOption(); -} - -void FacebookServiceClient::send_setOption(const std::string& key, const std::string& value) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("setOption", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_setOption_pargs args; - args.key = &key; - args.value = &value; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_setOption() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("setOption") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_setOption_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - return; -} - -void FacebookServiceClient::getOption(std::string& _return, const std::string& key) -{ - send_getOption(key); - recv_getOption(_return); -} - -void FacebookServiceClient::send_getOption(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getOption", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getOption_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getOption(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getOption") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getOption_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getOption failed: unknown result"); -} - -void FacebookServiceClient::getOptions(std::map & _return) -{ - send_getOptions(); - recv_getOptions(_return); -} - -void FacebookServiceClient::send_getOptions() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getOptions", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getOptions_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getOptions(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getOptions") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getOptions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getOptions failed: unknown result"); -} - -void FacebookServiceClient::getCpuProfile(std::string& _return, const int32_t profileDurationInSec) -{ - send_getCpuProfile(profileDurationInSec); - recv_getCpuProfile(_return); -} - -void FacebookServiceClient::send_getCpuProfile(const int32_t profileDurationInSec) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCpuProfile_pargs args; - args.profileDurationInSec = &profileDurationInSec; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getCpuProfile(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCpuProfile") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getCpuProfile_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCpuProfile failed: unknown result"); -} - -int64_t FacebookServiceClient::aliveSince() -{ - send_aliveSince(); - return recv_aliveSince(); -} - -void FacebookServiceClient::send_aliveSince() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("aliveSince", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_aliveSince_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -int64_t FacebookServiceClient::recv_aliveSince() -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("aliveSince") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - int64_t _return; - FacebookService_aliveSince_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "aliveSince failed: unknown result"); -} - -void FacebookServiceClient::reinitialize() -{ - send_reinitialize(); -} - -void FacebookServiceClient::send_reinitialize() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("reinitialize", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_reinitialize_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::shutdown() -{ - send_shutdown(); -} - -void FacebookServiceClient::send_shutdown() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("shutdown", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_shutdown_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool FacebookServiceProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { - - apache::thrift::protocol::TProtocol* iprot = piprot.get(); - apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { - iprot->skip(apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return true; - } - - return process_fn(iprot, oprot, fname, seqid); -} - -bool FacebookServiceProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { - std::map::iterator pfn; - pfn = processMap_.find(fname); - if (pfn == processMap_.end()) { - iprot->skip(apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return true; - } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; -} - -void FacebookServiceProcessor::process_getName(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getName_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getName_result result; - try { - iface_->getName(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getName", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getName", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getVersion(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getVersion_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getVersion_result result; - try { - iface_->getVersion(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getVersion", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getVersion", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getStatus_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getStatus_result result; - try { - result.success = iface_->getStatus(); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getStatus", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getStatus", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getStatusDetails(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getStatusDetails_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getStatusDetails_result result; - try { - iface_->getStatusDetails(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCounters(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCounters_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCounters_result result; - try { - iface_->getCounters(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCounters", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCounters", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCounter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCounter_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCounter_result result; - try { - result.success = iface_->getCounter(args.key); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCounter", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCounter", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_setOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_setOption_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_setOption_result result; - try { - iface_->setOption(args.key, args.value); - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("setOption", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("setOption", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getOption_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getOption_result result; - try { - iface_->getOption(result.success, args.key); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getOption", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getOption", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getOptions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getOptions_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getOptions_result result; - try { - iface_->getOptions(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getOptions", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getOptions", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCpuProfile(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCpuProfile_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCpuProfile_result result; - try { - iface_->getCpuProfile(result.success, args.profileDurationInSec); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_aliveSince(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_aliveSince_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_aliveSince_result result; - try { - result.success = iface_->aliveSince(); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("aliveSince", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("aliveSince", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_reinitialize(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_reinitialize_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - try { - iface_->reinitialize(); - } catch (const std::exception& e) { - } - return; -} - -void FacebookServiceProcessor::process_shutdown(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_shutdown_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - try { - iface_->shutdown(); - } catch (const std::exception& e) { - } - return; -} - -}} // namespace - diff --git service/include/thrift/fb303/FacebookService.h service/include/thrift/fb303/FacebookService.h deleted file mode 100644 index dcd843f..0000000 --- service/include/thrift/fb303/FacebookService.h +++ /dev/null @@ -1,1359 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef FacebookService_H -#define FacebookService_H - -#include -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -class FacebookServiceIf { - public: - virtual ~FacebookServiceIf() {} - virtual void getName(std::string& _return) = 0; - virtual void getVersion(std::string& _return) = 0; - virtual fb_status getStatus() = 0; - virtual void getStatusDetails(std::string& _return) = 0; - virtual void getCounters(std::map & _return) = 0; - virtual int64_t getCounter(const std::string& key) = 0; - virtual void setOption(const std::string& key, const std::string& value) = 0; - virtual void getOption(std::string& _return, const std::string& key) = 0; - virtual void getOptions(std::map & _return) = 0; - virtual void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) = 0; - virtual int64_t aliveSince() = 0; - virtual void reinitialize() = 0; - virtual void shutdown() = 0; -}; - -class FacebookServiceNull : virtual public FacebookServiceIf { - public: - virtual ~FacebookServiceNull() {} - void getName(std::string& /* _return */) { - return; - } - void getVersion(std::string& /* _return */) { - return; - } - fb_status getStatus() { - fb_status _return = (fb_status)0; - return _return; - } - void getStatusDetails(std::string& /* _return */) { - return; - } - void getCounters(std::map & /* _return */) { - return; - } - int64_t getCounter(const std::string& /* key */) { - int64_t _return = 0; - return _return; - } - void setOption(const std::string& /* key */, const std::string& /* value */) { - return; - } - void getOption(std::string& /* _return */, const std::string& /* key */) { - return; - } - void getOptions(std::map & /* _return */) { - return; - } - void getCpuProfile(std::string& /* _return */, const int32_t /* profileDurationInSec */) { - return; - } - int64_t aliveSince() { - int64_t _return = 0; - return _return; - } - void reinitialize() { - return; - } - void shutdown() { - return; - } -}; - -class FacebookService_getName_args { - public: - - FacebookService_getName_args() { - } - - virtual ~FacebookService_getName_args() throw() {} - - - bool operator == (const FacebookService_getName_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getName_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getName_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_pargs { - public: - - - virtual ~FacebookService_getName_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_result { - public: - - FacebookService_getName_result() : success("") { - } - - virtual ~FacebookService_getName_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getName_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getName_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getName_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_presult { - public: - - - virtual ~FacebookService_getName_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getVersion_args { - public: - - FacebookService_getVersion_args() { - } - - virtual ~FacebookService_getVersion_args() throw() {} - - - bool operator == (const FacebookService_getVersion_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getVersion_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getVersion_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_pargs { - public: - - - virtual ~FacebookService_getVersion_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_result { - public: - - FacebookService_getVersion_result() : success("") { - } - - virtual ~FacebookService_getVersion_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getVersion_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getVersion_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getVersion_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_presult { - public: - - - virtual ~FacebookService_getVersion_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getStatus_args { - public: - - FacebookService_getStatus_args() { - } - - virtual ~FacebookService_getStatus_args() throw() {} - - - bool operator == (const FacebookService_getStatus_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getStatus_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatus_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_pargs { - public: - - - virtual ~FacebookService_getStatus_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_result { - public: - - FacebookService_getStatus_result() { - } - - virtual ~FacebookService_getStatus_result() throw() {} - - fb_status success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getStatus_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getStatus_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatus_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_presult { - public: - - - virtual ~FacebookService_getStatus_presult() throw() {} - - fb_status* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getStatusDetails_args { - public: - - FacebookService_getStatusDetails_args() { - } - - virtual ~FacebookService_getStatusDetails_args() throw() {} - - - bool operator == (const FacebookService_getStatusDetails_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getStatusDetails_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatusDetails_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_pargs { - public: - - - virtual ~FacebookService_getStatusDetails_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_result { - public: - - FacebookService_getStatusDetails_result() : success("") { - } - - virtual ~FacebookService_getStatusDetails_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getStatusDetails_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getStatusDetails_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatusDetails_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_presult { - public: - - - virtual ~FacebookService_getStatusDetails_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCounters_args { - public: - - FacebookService_getCounters_args() { - } - - virtual ~FacebookService_getCounters_args() throw() {} - - - bool operator == (const FacebookService_getCounters_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getCounters_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounters_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_pargs { - public: - - - virtual ~FacebookService_getCounters_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_result { - public: - - FacebookService_getCounters_result() { - } - - virtual ~FacebookService_getCounters_result() throw() {} - - std::map success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCounters_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCounters_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounters_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_presult { - public: - - - virtual ~FacebookService_getCounters_presult() throw() {} - - std::map * success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCounter_args { - public: - - FacebookService_getCounter_args() : key("") { - } - - virtual ~FacebookService_getCounter_args() throw() {} - - std::string key; - - struct __isset { - __isset() : key(false) {} - bool key; - } __isset; - - bool operator == (const FacebookService_getCounter_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const FacebookService_getCounter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounter_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_pargs { - public: - - - virtual ~FacebookService_getCounter_pargs() throw() {} - - const std::string* key; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_result { - public: - - FacebookService_getCounter_result() : success(0) { - } - - virtual ~FacebookService_getCounter_result() throw() {} - - int64_t success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCounter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCounter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounter_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_presult { - public: - - - virtual ~FacebookService_getCounter_presult() throw() {} - - int64_t* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_setOption_args { - public: - - FacebookService_setOption_args() : key(""), value("") { - } - - virtual ~FacebookService_setOption_args() throw() {} - - std::string key; - std::string value; - - struct __isset { - __isset() : key(false), value(false) {} - bool key; - bool value; - } __isset; - - bool operator == (const FacebookService_setOption_args & rhs) const - { - if (!(key == rhs.key)) - return false; - if (!(value == rhs.value)) - return false; - return true; - } - bool operator != (const FacebookService_setOption_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_setOption_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_pargs { - public: - - - virtual ~FacebookService_setOption_pargs() throw() {} - - const std::string* key; - const std::string* value; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_result { - public: - - FacebookService_setOption_result() { - } - - virtual ~FacebookService_setOption_result() throw() {} - - - bool operator == (const FacebookService_setOption_result & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_setOption_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_setOption_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_presult { - public: - - - virtual ~FacebookService_setOption_presult() throw() {} - - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getOption_args { - public: - - FacebookService_getOption_args() : key("") { - } - - virtual ~FacebookService_getOption_args() throw() {} - - std::string key; - - struct __isset { - __isset() : key(false) {} - bool key; - } __isset; - - bool operator == (const FacebookService_getOption_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const FacebookService_getOption_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOption_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_pargs { - public: - - - virtual ~FacebookService_getOption_pargs() throw() {} - - const std::string* key; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_result { - public: - - FacebookService_getOption_result() : success("") { - } - - virtual ~FacebookService_getOption_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getOption_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getOption_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOption_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_presult { - public: - - - virtual ~FacebookService_getOption_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getOptions_args { - public: - - FacebookService_getOptions_args() { - } - - virtual ~FacebookService_getOptions_args() throw() {} - - - bool operator == (const FacebookService_getOptions_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getOptions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOptions_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_pargs { - public: - - - virtual ~FacebookService_getOptions_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_result { - public: - - FacebookService_getOptions_result() { - } - - virtual ~FacebookService_getOptions_result() throw() {} - - std::map success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getOptions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getOptions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOptions_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_presult { - public: - - - virtual ~FacebookService_getOptions_presult() throw() {} - - std::map * success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCpuProfile_args { - public: - - FacebookService_getCpuProfile_args() : profileDurationInSec(0) { - } - - virtual ~FacebookService_getCpuProfile_args() throw() {} - - int32_t profileDurationInSec; - - struct __isset { - __isset() : profileDurationInSec(false) {} - bool profileDurationInSec; - } __isset; - - bool operator == (const FacebookService_getCpuProfile_args & rhs) const - { - if (!(profileDurationInSec == rhs.profileDurationInSec)) - return false; - return true; - } - bool operator != (const FacebookService_getCpuProfile_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCpuProfile_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_pargs { - public: - - - virtual ~FacebookService_getCpuProfile_pargs() throw() {} - - const int32_t* profileDurationInSec; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_result { - public: - - FacebookService_getCpuProfile_result() : success("") { - } - - virtual ~FacebookService_getCpuProfile_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCpuProfile_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCpuProfile_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCpuProfile_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_presult { - public: - - - virtual ~FacebookService_getCpuProfile_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_aliveSince_args { - public: - - FacebookService_aliveSince_args() { - } - - virtual ~FacebookService_aliveSince_args() throw() {} - - - bool operator == (const FacebookService_aliveSince_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_aliveSince_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_aliveSince_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_pargs { - public: - - - virtual ~FacebookService_aliveSince_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_result { - public: - - FacebookService_aliveSince_result() : success(0) { - } - - virtual ~FacebookService_aliveSince_result() throw() {} - - int64_t success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_aliveSince_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_aliveSince_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_aliveSince_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_presult { - public: - - - virtual ~FacebookService_aliveSince_presult() throw() {} - - int64_t* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_reinitialize_args { - public: - - FacebookService_reinitialize_args() { - } - - virtual ~FacebookService_reinitialize_args() throw() {} - - - bool operator == (const FacebookService_reinitialize_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_reinitialize_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_reinitialize_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_reinitialize_pargs { - public: - - - virtual ~FacebookService_reinitialize_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_shutdown_args { - public: - - FacebookService_shutdown_args() { - } - - virtual ~FacebookService_shutdown_args() throw() {} - - - bool operator == (const FacebookService_shutdown_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_shutdown_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_shutdown_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_shutdown_pargs { - public: - - - virtual ~FacebookService_shutdown_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookServiceClient : virtual public FacebookServiceIf { - public: - FacebookServiceClient(boost::shared_ptr prot) : - piprot_(prot), - poprot_(prot) { - iprot_ = prot.get(); - oprot_ = prot.get(); - } - FacebookServiceClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : - piprot_(iprot), - poprot_(oprot) { - iprot_ = iprot.get(); - oprot_ = oprot.get(); - } - boost::shared_ptr getInputProtocol() { - return piprot_; - } - boost::shared_ptr getOutputProtocol() { - return poprot_; - } - void getName(std::string& _return); - void send_getName(); - void recv_getName(std::string& _return); - void getVersion(std::string& _return); - void send_getVersion(); - void recv_getVersion(std::string& _return); - fb_status getStatus(); - void send_getStatus(); - fb_status recv_getStatus(); - void getStatusDetails(std::string& _return); - void send_getStatusDetails(); - void recv_getStatusDetails(std::string& _return); - void getCounters(std::map & _return); - void send_getCounters(); - void recv_getCounters(std::map & _return); - int64_t getCounter(const std::string& key); - void send_getCounter(const std::string& key); - int64_t recv_getCounter(); - void setOption(const std::string& key, const std::string& value); - void send_setOption(const std::string& key, const std::string& value); - void recv_setOption(); - void getOption(std::string& _return, const std::string& key); - void send_getOption(const std::string& key); - void recv_getOption(std::string& _return); - void getOptions(std::map & _return); - void send_getOptions(); - void recv_getOptions(std::map & _return); - void getCpuProfile(std::string& _return, const int32_t profileDurationInSec); - void send_getCpuProfile(const int32_t profileDurationInSec); - void recv_getCpuProfile(std::string& _return); - int64_t aliveSince(); - void send_aliveSince(); - int64_t recv_aliveSince(); - void reinitialize(); - void send_reinitialize(); - void shutdown(); - void send_shutdown(); - protected: - boost::shared_ptr piprot_; - boost::shared_ptr poprot_; - apache::thrift::protocol::TProtocol* iprot_; - apache::thrift::protocol::TProtocol* oprot_; -}; - -class FacebookServiceProcessor : virtual public apache::thrift::TProcessor { - protected: - boost::shared_ptr iface_; - virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); - private: - std::map processMap_; - void process_getName(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getVersion(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getStatusDetails(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCounters(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCounter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_setOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getOptions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCpuProfile(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_aliveSince(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_reinitialize(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_shutdown(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - public: - FacebookServiceProcessor(boost::shared_ptr iface) : - iface_(iface) { - processMap_["getName"] = &FacebookServiceProcessor::process_getName; - processMap_["getVersion"] = &FacebookServiceProcessor::process_getVersion; - processMap_["getStatus"] = &FacebookServiceProcessor::process_getStatus; - processMap_["getStatusDetails"] = &FacebookServiceProcessor::process_getStatusDetails; - processMap_["getCounters"] = &FacebookServiceProcessor::process_getCounters; - processMap_["getCounter"] = &FacebookServiceProcessor::process_getCounter; - processMap_["setOption"] = &FacebookServiceProcessor::process_setOption; - processMap_["getOption"] = &FacebookServiceProcessor::process_getOption; - processMap_["getOptions"] = &FacebookServiceProcessor::process_getOptions; - processMap_["getCpuProfile"] = &FacebookServiceProcessor::process_getCpuProfile; - processMap_["aliveSince"] = &FacebookServiceProcessor::process_aliveSince; - processMap_["reinitialize"] = &FacebookServiceProcessor::process_reinitialize; - processMap_["shutdown"] = &FacebookServiceProcessor::process_shutdown; - } - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); - virtual ~FacebookServiceProcessor() {} -}; - -class FacebookServiceMultiface : virtual public FacebookServiceIf { - public: - FacebookServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { - } - virtual ~FacebookServiceMultiface() {} - protected: - std::vector > ifaces_; - FacebookServiceMultiface() {} - void add(boost::shared_ptr iface) { - ifaces_.push_back(iface); - } - public: - void getName(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getName(_return); - return; - } else { - ifaces_[i]->getName(_return); - } - } - } - - void getVersion(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getVersion(_return); - return; - } else { - ifaces_[i]->getVersion(_return); - } - } - } - - fb_status getStatus() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->getStatus(); - } else { - ifaces_[i]->getStatus(); - } - } - } - - void getStatusDetails(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getStatusDetails(_return); - return; - } else { - ifaces_[i]->getStatusDetails(_return); - } - } - } - - void getCounters(std::map & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getCounters(_return); - return; - } else { - ifaces_[i]->getCounters(_return); - } - } - } - - int64_t getCounter(const std::string& key) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->getCounter(key); - } else { - ifaces_[i]->getCounter(key); - } - } - } - - void setOption(const std::string& key, const std::string& value) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->setOption(key, value); - } - } - - void getOption(std::string& _return, const std::string& key) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getOption(_return, key); - return; - } else { - ifaces_[i]->getOption(_return, key); - } - } - } - - void getOptions(std::map & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getOptions(_return); - return; - } else { - ifaces_[i]->getOptions(_return); - } - } - } - - void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getCpuProfile(_return, profileDurationInSec); - return; - } else { - ifaces_[i]->getCpuProfile(_return, profileDurationInSec); - } - } - } - - int64_t aliveSince() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->aliveSince(); - } else { - ifaces_[i]->aliveSince(); - } - } - } - - void reinitialize() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->reinitialize(); - } - } - - void shutdown() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->shutdown(); - } - } - -}; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/ServiceTracker.h service/include/thrift/fb303/ServiceTracker.h deleted file mode 100644 index 9304386..0000000 --- service/include/thrift/fb303/ServiceTracker.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * ServiceTracker is a utility class for logging and timing service - * calls to a fb303 Thrift server. Currently, ServiceTracker offers - * the following features: - * - * . Logging of service method start, end (and duration), and - * optional steps in between. - * - * . Automatic check of server status via fb303::getStatus() - * with a ServiceException thrown if server not alive - * (at method start). - * - * . A periodic logged checkpoint reporting lifetime time, lifetime - * service count, and per-method statistics since the last checkpoint - * time (at method finish). - * - * . Export of fb303 counters for lifetime and checkpoint statistics - * (at method finish). - * - * . For TThreadPoolServers, a logged warning when all server threads - * are busy (at method start). (Must call setThreadManager() after - * ServiceTracker instantiation for this feature to be enabled.) - * - * Individual features may be enabled or disabled by arguments to the - * constructor. The constructor also accepts a pointer to a logging - * method -- if no pointer is passed, the tracker will log to stdout. - * - * ServiceTracker defines private methods for service start, finish, - * and step, which are designed to be accessed by instantiating a - * friend ServiceMethod object, as in the following example: - * - * #include - * class MyServiceHandler : virtual public MyServiceIf, - * public facebook::fb303::FacebookBase - * { - * public: - * MyServiceHandler::MyServiceHandler() : mServiceTracker(this) {} - * void MyServiceHandler::myServiceMethod(int userId) { - * // note: Instantiating a ServiceMethod object starts a timer - * // and tells the ServiceTracker to log the start. Might throw - * // a ServiceException. - * ServiceMethod serviceMethod(&mServiceTracker, - * "myServiceMethod", - * userId); - * ... - * // note: Calling the step method tells the ServiceTracker to - * // log the step, with a time elapsed since start. - * serviceMethod.step("post parsing, begin processing"); - * ... - * // note: When the ServiceMethod object goes out of scope, the - * // ServiceTracker will log the total elapsed time of the method. - * } - * ... - * private: - * ServiceTracker mServiceTracker; - * } - * - * The step() method call is optional; the startService() and - * finishService() methods are handled by the object's constructor and - * destructor. - * - * The ServiceTracker is (intended to be) thread-safe. - * - * Future: - * - * . Come up with something better for logging than passing a - * function pointer to the constructor. - * - * . Add methods for tracking errors from service methods, e.g. - * ServiceTracker::reportService(). - */ - -#ifndef SERVICETRACKER_H -#define SERVICETRACKER_H - - -#include -#include -#include -#include -#include -#include - -#include "concurrency/Mutex.h" - - -namespace apache { namespace thrift { namespace concurrency { - class ThreadManager; -}}} - - -namespace facebook { namespace fb303 { - - -class FacebookBase; -class ServiceMethod; - - -class Stopwatch -{ -public: - enum Unit { UNIT_SECONDS, UNIT_MILLISECONDS, UNIT_MICROSECONDS }; - Stopwatch(); - uint64_t elapsedUnits(Unit unit, std::string *label = NULL) const; - void reset(); -private: - timeval startTime_; -}; - - -class ServiceTracker -{ - friend class ServiceMethod; - -public: - - static uint64_t CHECKPOINT_MINIMUM_INTERVAL_SECONDS; - static int LOG_LEVEL; - - ServiceTracker(facebook::fb303::FacebookBase *handler, - void (*logMethod)(int, const std::string &) - = &ServiceTracker::defaultLogMethod, - bool featureCheckpoint = true, - bool featureStatusCheck = true, - bool featureThreadCheck = true, - Stopwatch::Unit stopwatchUnit - = Stopwatch::UNIT_MILLISECONDS); - - void setThreadManager(boost::shared_ptr threadManager); - -private: - - facebook::fb303::FacebookBase *handler_; - void (*logMethod_)(int, const std::string &); - boost::shared_ptr threadManager_; - - bool featureCheckpoint_; - bool featureStatusCheck_; - bool featureThreadCheck_; - Stopwatch::Unit stopwatchUnit_; - - apache::thrift::concurrency::Mutex statisticsMutex_; - time_t checkpointTime_; - uint64_t checkpointServices_; - uint64_t checkpointDuration_; - std::map > checkpointServiceDuration_; - - void startService(const ServiceMethod &serviceMethod); - int64_t stepService(const ServiceMethod &serviceMethod, - const std::string &stepName); - void finishService(const ServiceMethod &serviceMethod); - void reportCheckpoint(); - static void defaultLogMethod(int level, const std::string &message); -}; - - -class ServiceMethod -{ - friend class ServiceTracker; -public: - ServiceMethod(ServiceTracker *tracker, - const std::string &name, - const std::string &signature, - bool featureLogOnly = false); - ServiceMethod(ServiceTracker *tracker, - const std::string &name, - uint64_t id, - bool featureLogOnly = false); - ~ServiceMethod(); - uint64_t step(const std::string &stepName); -private: - ServiceTracker *tracker_; - std::string name_; - std::string signature_; - bool featureLogOnly_; - Stopwatch timer_; -}; - - -class ServiceException : public std::exception -{ -public: - explicit ServiceException(const std::string &message, int code = 0) - : message_(message), code_(code) {} - ~ServiceException() throw() {} - virtual const char *what() const throw() { return message_.c_str(); } - int code() const throw() { return code_; } -private: - std::string message_; - int code_; -}; - - -}} // facebook::fb303 - -#endif diff --git service/include/thrift/fb303/fb303_constants.cpp service/include/thrift/fb303/fb303_constants.cpp deleted file mode 100644 index 66b8782..0000000 --- service/include/thrift/fb303/fb303_constants.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "fb303_constants.h" - -namespace facebook { namespace fb303 { - -const fb303Constants g_fb303_constants; - -fb303Constants::fb303Constants() { -} - -}} // namespace - diff --git service/include/thrift/fb303/fb303_constants.h service/include/thrift/fb303/fb303_constants.h deleted file mode 100644 index 19405bc..0000000 --- service/include/thrift/fb303/fb303_constants.h +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef fb303_CONSTANTS_H -#define fb303_CONSTANTS_H - -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -class fb303Constants { - public: - fb303Constants(); - -}; - -extern const fb303Constants g_fb303_constants; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/fb303_types.cpp service/include/thrift/fb303/fb303_types.cpp deleted file mode 100644 index f290125..0000000 --- service/include/thrift/fb303/fb303_types.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -}} // namespace diff --git service/include/thrift/fb303/fb303_types.h service/include/thrift/fb303/fb303_types.h deleted file mode 100644 index 18936f9..0000000 --- service/include/thrift/fb303/fb303_types.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef fb303_TYPES_H -#define fb303_TYPES_H - -#include -#include -#include - - - -namespace facebook { namespace fb303 { - -enum fb_status { - DEAD = 0, - STARTING = 1, - ALIVE = 2, - STOPPING = 3, - STOPPED = 4, - WARNING = 5 -}; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/if/fb303.thrift service/include/thrift/fb303/if/fb303.thrift deleted file mode 100644 index 66c8315..0000000 --- service/include/thrift/fb303/if/fb303.thrift +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * fb303.thrift - */ - -namespace java com.facebook.fb303 -namespace cpp facebook.fb303 -namespace perl Facebook.FB303 - -/** - * Common status reporting mechanism across all services - */ -enum fb_status { - DEAD = 0, - STARTING = 1, - ALIVE = 2, - STOPPING = 3, - STOPPED = 4, - WARNING = 5, -} - -/** - * Standard base service - */ -service FacebookService { - - /** - * Returns a descriptive name of the service - */ - string getName(), - - /** - * Returns the version of the service - */ - string getVersion(), - - /** - * Gets the status of this service - */ - fb_status getStatus(), - - /** - * User friendly description of status, such as why the service is in - * the dead or warning state, or what is being started or stopped. - */ - string getStatusDetails(), - - /** - * Gets the counters for this service - */ - map getCounters(), - - /** - * Gets the value of a single counter - */ - i64 getCounter(1: string key), - - /** - * Sets an option - */ - void setOption(1: string key, 2: string value), - - /** - * Gets an option - */ - string getOption(1: string key), - - /** - * Gets all options - */ - map getOptions(), - - /** - * Returns a CPU profile over the given time interval (client and server - * must agree on the profile format). - */ - string getCpuProfile(1: i32 profileDurationInSec), - - /** - * Returns the unix time that the server has been running since - */ - i64 aliveSince(), - - /** - * Tell the server to reload its configuration, reopen log files, etc - */ - oneway void reinitialize(), - - /** - * Suggest a shutdown to the server - */ - oneway void shutdown(), - -} diff --git service/include/thrift/if/reflection_limited.thrift service/include/thrift/if/reflection_limited.thrift deleted file mode 100644 index 993c46e..0000000 --- service/include/thrift/if/reflection_limited.thrift +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/local/bin/thrift -php -java -cpp -py - -// NOTICE!!! -// DO NOT FORGET to run regen.sh if you change this file -// (or if you change the compiler). - -// This interface is deprecated. -// There is no replacement yet, but I hate it so much that -// I'm deprecating it before it's done. -// @author I'm too ashamed to say. - -// dreiss naively thinks he knows how to do this better, -// so talk to him if you are interested in taking it on, -// or if you just want someone to make it better for you. - -namespace cpp facebook.thrift.reflection.limited -namespace java com.facebook.thrift.reflection.limited -namespace py thrift.reflection.limited - -enum TTypeTag { - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I16 = 6, - T_I32 = 8, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - // This doesn't exist in TBinaryProtocol, but it could be useful for reflection. - T_ENUM = 101, - T_NOT_REFLECTED = 102, -} - -struct SimpleType { - 1: TTypeTag ttype, - 2: string name, // For structs and emums. -} - -struct ContainerType { - 1: TTypeTag ttype, - 2: SimpleType subtype1, - 3: optional SimpleType subtype2, -} - -struct ThriftType { - 1: bool is_container, - 2: optional SimpleType simple_type, - 3: optional ContainerType container_type, -} - -struct Argument { - 1: i16 key, - 2: string name, - 3: ThriftType type, -} - -struct Method { - 1: string name, - 2: ThriftType return_type, - 3: list arguments, -} - -struct Service { - 1: string name, - 2: list methods, - 3: bool fully_reflected, -} diff --git service/include/thrift/processor/PeekProcessor.h service/include/thrift/processor/PeekProcessor.h deleted file mode 100644 index 0f7c016..0000000 --- service/include/thrift/processor/PeekProcessor.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef PEEKPROCESSOR_H -#define PEEKPROCESSOR_H - -#include -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace processor { - -/* - * Class for peeking at the raw data that is being processed by another processor - * and gives the derived class a chance to change behavior accordingly - * - */ -class PeekProcessor : public apache::thrift::TProcessor { - - public: - PeekProcessor(); - virtual ~PeekProcessor(); - - // Input here: actualProcessor - the underlying processor - // protocolFactory - the protocol factory used to wrap the memory buffer - // transportFactory - this TPipedTransportFactory is used to wrap the source transport - // via a call to getPipedTransport - void initialize(boost::shared_ptr actualProcessor, - boost::shared_ptr protocolFactory, - boost::shared_ptr transportFactory); - - boost::shared_ptr getPipedTransport(boost::shared_ptr in); - - void setTargetTransport(boost::shared_ptr targetTransport); - - virtual bool process(boost::shared_ptr in, - boost::shared_ptr out); - - // The following three functions can be overloaded by child classes to - // achieve desired peeking behavior - virtual void peekName(const std::string& fname); - virtual void peekBuffer(uint8_t* buffer, uint32_t size); - virtual void peek(boost::shared_ptr in, - apache::thrift::protocol::TType ftype, - int16_t fid); - virtual void peekEnd(); - - private: - boost::shared_ptr actualProcessor_; - boost::shared_ptr pipedProtocol_; - boost::shared_ptr transportFactory_; - boost::shared_ptr memoryBuffer_; - boost::shared_ptr targetTransport_; -}; - -}}} // apache::thrift::processor - -#endif diff --git service/include/thrift/processor/StatsProcessor.h service/include/thrift/processor/StatsProcessor.h deleted file mode 100644 index 820b3ad..0000000 --- service/include/thrift/processor/StatsProcessor.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef STATSPROCESSOR_H -#define STATSPROCESSOR_H - -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace processor { - -/* - * Class for keeping track of function call statistics and printing them if desired - * - */ -class StatsProcessor : public apache::thrift::TProcessor { -public: - StatsProcessor(bool print, bool frequency) - : print_(print), - frequency_(frequency) - {} - virtual ~StatsProcessor() {}; - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot) { - - piprot_ = piprot; - - std::string fname; - apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - piprot_->readMessageBegin(fname, mtype, seqid); - if (mtype != apache::thrift::protocol::T_CALL) { - if (print_) { - printf("Unknown message type\n"); - } - throw apache::thrift::TException("Unexpected message type"); - } - if (print_) { - printf("%s (", fname.c_str()); - } - if (frequency_) { - if (frequency_map_.find(fname) != frequency_map_.end()) { - frequency_map_[fname]++; - } else { - frequency_map_[fname] = 1; - } - } - - apache::thrift::protocol::TType ftype; - int16_t fid; - - while (true) { - piprot_->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - - printAndPassToBuffer(ftype); - if (print_) { - printf(", "); - } - } - - if (print_) { - printf("\b\b)\n"); - } - return true; - } - - const std::map& get_frequency_map() { - return frequency_map_; - } - -protected: - void printAndPassToBuffer(apache::thrift::protocol::TType ftype) { - switch (ftype) { - case apache::thrift::protocol::T_BOOL: - { - bool boolv; - piprot_->readBool(boolv); - if (print_) { - printf("%d", boolv); - } - } - break; - case apache::thrift::protocol::T_BYTE: - { - int8_t bytev; - piprot_->readByte(bytev); - if (print_) { - printf("%d", bytev); - } - } - break; - case apache::thrift::protocol::T_I16: - { - int16_t i16; - piprot_->readI16(i16); - if (print_) { - printf("%d", i16); - } - } - break; - case apache::thrift::protocol::T_I32: - { - int32_t i32; - piprot_->readI32(i32); - if (print_) { - printf("%d", i32); - } - } - break; - case apache::thrift::protocol::T_I64: - { - int64_t i64; - piprot_->readI64(i64); - if (print_) { - printf("%ld", i64); - } - } - break; - case apache::thrift::protocol::T_DOUBLE: - { - double dub; - piprot_->readDouble(dub); - if (print_) { - printf("%f", dub); - } - } - break; - case apache::thrift::protocol::T_STRING: - { - std::string str; - piprot_->readString(str); - if (print_) { - printf("%s", str.c_str()); - } - } - break; - case apache::thrift::protocol::T_STRUCT: - { - std::string name; - int16_t fid; - apache::thrift::protocol::TType ftype; - piprot_->readStructBegin(name); - if (print_) { - printf("<"); - } - while (true) { - piprot_->readFieldBegin(name, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - printAndPassToBuffer(ftype); - if (print_) { - printf(","); - } - piprot_->readFieldEnd(); - } - piprot_->readStructEnd(); - if (print_) { - printf("\b>"); - } - } - break; - case apache::thrift::protocol::T_MAP: - { - apache::thrift::protocol::TType keyType; - apache::thrift::protocol::TType valType; - uint32_t i, size; - piprot_->readMapBegin(keyType, valType, size); - if (print_) { - printf("{"); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(keyType); - if (print_) { - printf("=>"); - } - printAndPassToBuffer(valType); - if (print_) { - printf(","); - } - } - piprot_->readMapEnd(); - if (print_) { - printf("\b}"); - } - } - break; - case apache::thrift::protocol::T_SET: - { - apache::thrift::protocol::TType elemType; - uint32_t i, size; - piprot_->readSetBegin(elemType, size); - if (print_) { - printf("{"); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(elemType); - if (print_) { - printf(","); - } - } - piprot_->readSetEnd(); - if (print_) { - printf("\b}"); - } - } - break; - case apache::thrift::protocol::T_LIST: - { - apache::thrift::protocol::TType elemType; - uint32_t i, size; - piprot_->readListBegin(elemType, size); - if (print_) { - printf("["); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(elemType); - if (print_) { - printf(","); - } - } - piprot_->readListEnd(); - if (print_) { - printf("\b]"); - } - } - break; - default: - break; - } - } - - boost::shared_ptr piprot_; - std::map frequency_map_; - - bool print_; - bool frequency_; -}; - -}}} // apache::thrift::processor - -#endif diff --git service/include/thrift/protocol/TBase64Utils.h service/include/thrift/protocol/TBase64Utils.h deleted file mode 100644 index 3def733..0000000 --- service/include/thrift/protocol/TBase64Utils.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TBASE64UTILS_H_ -#define _THRIFT_PROTOCOL_TBASE64UTILS_H_ - -#include -#include - -namespace apache { namespace thrift { namespace protocol { - -// in must be at least len bytes -// len must be 1, 2, or 3 -// buf must be a buffer of at least 4 bytes and may not overlap in -// the data is not padded with '='; the caller can do this if desired -void base64_encode(const uint8_t *in, uint32_t len, uint8_t *buf); - -// buf must be a buffer of at least 4 bytes and contain base64 encoded values -// buf will be changed to contain output bytes -// len is number of bytes to consume from input (must be 2, 3, or 4) -// no '=' padding should be included in the input -void base64_decode(uint8_t *buf, uint32_t len); - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TBASE64UTILS_H_ diff --git service/include/thrift/protocol/TBinaryProtocol.h service/include/thrift/protocol/TBinaryProtocol.h deleted file mode 100644 index 7fd3de6..0000000 --- service/include/thrift/protocol/TBinaryProtocol.h +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * The default binary protocol for thrift. Writes all data in a very basic - * binary format, essentially just spitting out the raw bytes. - * - */ -class TBinaryProtocol : public TProtocol { - protected: - static const int32_t VERSION_MASK = 0xffff0000; - static const int32_t VERSION_1 = 0x80010000; - // VERSION_2 (0x80020000) is taken by TDenseProtocol. - - public: - TBinaryProtocol(boost::shared_ptr trans) : - TProtocol(trans), - string_limit_(0), - container_limit_(0), - strict_read_(false), - strict_write_(true), - string_buf_(NULL), - string_buf_size_(0) {} - - TBinaryProtocol(boost::shared_ptr trans, - int32_t string_limit, - int32_t container_limit, - bool strict_read, - bool strict_write) : - TProtocol(trans), - string_limit_(string_limit), - container_limit_(container_limit), - strict_read_(strict_read), - strict_write_(strict_write), - string_buf_(NULL), - string_buf_size_(0) {} - - ~TBinaryProtocol() { - if (string_buf_ != NULL) { - std::free(string_buf_); - string_buf_size_ = 0; - } - } - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - void setStrict(bool strict_read, bool strict_write) { - strict_read_ = strict_read; - strict_write_ = strict_write; - } - - /** - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * Reading functions - */ - - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - protected: - uint32_t readStringBody(std::string& str, int32_t sz); - - int32_t string_limit_; - int32_t container_limit_; - - // Enforce presence of version identifier - bool strict_read_; - bool strict_write_; - - // Buffer for reading strings, save for the lifetime of the protocol to - // avoid memory churn allocating memory on every string read - uint8_t* string_buf_; - int32_t string_buf_size_; - -}; - -/** - * Constructs binary protocol handlers - */ -class TBinaryProtocolFactory : public TProtocolFactory { - public: - TBinaryProtocolFactory() : - string_limit_(0), - container_limit_(0), - strict_read_(false), - strict_write_(true) {} - - TBinaryProtocolFactory(int32_t string_limit, int32_t container_limit, bool strict_read, bool strict_write) : - string_limit_(string_limit), - container_limit_(container_limit), - strict_read_(strict_read), - strict_write_(strict_write) {} - - virtual ~TBinaryProtocolFactory() {} - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - void setStrict(bool strict_read, bool strict_write) { - strict_read_ = strict_read; - strict_write_ = strict_write; - } - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TBinaryProtocol(trans, string_limit_, container_limit_, strict_read_, strict_write_)); - } - - private: - int32_t string_limit_; - int32_t container_limit_; - bool strict_read_; - bool strict_write_; - -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ diff --git service/include/thrift/protocol/TCompactProtocol.h service/include/thrift/protocol/TCompactProtocol.h deleted file mode 100644 index b4e06f0..0000000 --- service/include/thrift/protocol/TCompactProtocol.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * C++ Implementation of the Compact Protocol as described in THRIFT-110 - */ -class TCompactProtocol : public TProtocol { - - protected: - static const int8_t PROTOCOL_ID = 0x82; - static const int8_t VERSION_N = 1; - static const int8_t VERSION_MASK = 0x1f; // 0001 1111 - static const int8_t TYPE_MASK = 0xE0; // 1110 0000 - static const int32_t TYPE_SHIFT_AMOUNT = 5; - - /** - * (Writing) If we encounter a boolean field begin, save the TField here - * so it can have the value incorporated. - */ - struct { - const char* name; - TType fieldType; - int16_t fieldId; - } booleanField_; - - /** - * (Reading) If we read a field header, and it's a boolean field, save - * the boolean value here so that readBool can use it. - */ - struct { - bool hasBoolValue; - bool boolValue; - } boolValue_; - - /** - * Used to keep track of the last field for the current and previous structs, - * so we can do the delta stuff. - */ - - std::stack lastField_; - int16_t lastFieldId_; - - enum Types { - CT_STOP = 0x00, - CT_BOOLEAN_TRUE = 0x01, - CT_BOOLEAN_FALSE = 0x02, - CT_BYTE = 0x03, - CT_I16 = 0x04, - CT_I32 = 0x05, - CT_I64 = 0x06, - CT_DOUBLE = 0x07, - CT_BINARY = 0x08, - CT_LIST = 0x09, - CT_SET = 0x0A, - CT_MAP = 0x0B, - CT_STRUCT = 0x0C, - }; - - static const int8_t TTypeToCType[16]; - - public: - TCompactProtocol(boost::shared_ptr trans) : - TProtocol(trans), - lastFieldId_(0), - string_limit_(0), - string_buf_(NULL), - string_buf_size_(0), - container_limit_(0) { - booleanField_.name = NULL; - boolValue_.hasBoolValue = false; - } - - TCompactProtocol(boost::shared_ptr trans, - int32_t string_limit, - int32_t container_limit) : - TProtocol(trans), - lastFieldId_(0), - string_limit_(string_limit), - string_buf_(NULL), - string_buf_size_(0), - container_limit_(container_limit) { - booleanField_.name = NULL; - boolValue_.hasBoolValue = false; - } - - - - /** - * Writing functions - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldStop(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * These methods are called by structs, but don't actually have any wired - * output or purpose - */ - virtual uint32_t writeMessageEnd() { return 0; } - uint32_t writeMapEnd() { return 0; } - uint32_t writeListEnd() { return 0; } - uint32_t writeSetEnd() { return 0; } - uint32_t writeFieldEnd() { return 0; } - - protected: - int32_t writeFieldBeginInternal(const char* name, - const TType fieldType, - const int16_t fieldId, - int8_t typeOverride); - uint32_t writeCollectionBegin(int8_t elemType, int32_t size); - uint32_t writeVarint32(uint32_t n); - uint32_t writeVarint64(uint64_t n); - uint64_t i64ToZigzag(const int64_t l); - uint32_t i32ToZigzag(const int32_t n); - inline int8_t getCompactType(int8_t ttype); - - public: - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - /* - *These methods are here for the struct to call, but don't have any wire - * encoding. - */ - uint32_t readMessageEnd() { return 0; } - uint32_t readFieldEnd() { return 0; } - uint32_t readMapEnd() { return 0; } - uint32_t readListEnd() { return 0; } - uint32_t readSetEnd() { return 0; } - - protected: - uint32_t readVarint32(int32_t& i32); - uint32_t readVarint64(int64_t& i64); - int32_t zigzagToI32(uint32_t n); - int64_t zigzagToI64(uint64_t n); - TType getTType(int8_t type); - - // Buffer for reading strings, save for the lifetime of the protocol to - // avoid memory churn allocating memory on every string read - int32_t string_limit_; - uint8_t* string_buf_; - int32_t string_buf_size_; - int32_t container_limit_; -}; - -/** - * Constructs compact protocol handlers - */ -class TCompactProtocolFactory : public TProtocolFactory { - public: - TCompactProtocolFactory() : - string_limit_(0), - container_limit_(0) {} - - TCompactProtocolFactory(int32_t string_limit, int32_t container_limit) : - string_limit_(string_limit), - container_limit_(container_limit) {} - - virtual ~TCompactProtocolFactory() {} - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TCompactProtocol(trans, string_limit_, container_limit_)); - } - - private: - int32_t string_limit_; - int32_t container_limit_; - -}; - -}}} // apache::thrift::protocol - -#endif diff --git service/include/thrift/protocol/TDebugProtocol.h service/include/thrift/protocol/TDebugProtocol.h deleted file mode 100644 index ab69e0c..0000000 --- service/include/thrift/protocol/TDebugProtocol.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ 1 - -#include "TProtocol.h" -#include "TOneWayProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -/* - -!!! EXPERIMENTAL CODE !!! - -This protocol is very much a work in progress. -It doesn't handle many cases properly. -It throws exceptions in many cases. -It probably segfaults in many cases. -Bug reports and feature requests are welcome. -Complaints are not. :R - -*/ - - -/** - * Protocol that prints the payload in a nice human-readable format. - * Reading from this protocol is not supported. - * - */ -class TDebugProtocol : public TWriteOnlyProtocol { - private: - enum write_state_t - { UNINIT - , STRUCT - , LIST - , SET - , MAP_KEY - , MAP_VALUE - }; - - public: - TDebugProtocol(boost::shared_ptr trans) - : TWriteOnlyProtocol(trans, "TDebugProtocol") - , string_limit_(DEFAULT_STRING_LIMIT) - , string_prefix_size_(DEFAULT_STRING_PREFIX_SIZE) - { - write_state_.push_back(UNINIT); - } - - static const int32_t DEFAULT_STRING_LIMIT = 256; - static const int32_t DEFAULT_STRING_PREFIX_SIZE = 16; - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setStringPrefixSize(int32_t string_prefix_size) { - string_prefix_size_ = string_prefix_size; - } - - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - - private: - void indentUp(); - void indentDown(); - uint32_t writePlain(const std::string& str); - uint32_t writeIndented(const std::string& str); - uint32_t startItem(); - uint32_t endItem(); - uint32_t writeItem(const std::string& str); - - static std::string fieldTypeName(TType type); - - int32_t string_limit_; - int32_t string_prefix_size_; - - std::string indent_str_; - static const int indent_inc = 2; - - std::vector write_state_; - std::vector list_idx_; -}; - -/** - * Constructs debug protocol handlers - */ -class TDebugProtocolFactory : public TProtocolFactory { - public: - TDebugProtocolFactory() {} - virtual ~TDebugProtocolFactory() {} - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TDebugProtocol(trans)); - } - -}; - -}}} // apache::thrift::protocol - - -// TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this. -#include - -namespace apache { namespace thrift { - -template -std::string ThriftDebugString(const ThriftStruct& ts) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TDebugProtocol protocol(trans); - - ts.write(&protocol); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} - -// TODO(dreiss): This is badly broken. Don't use it unless you are me. -#if 0 -template -std::string DebugString(const std::vector& vec) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TDebugProtocol protocol(trans); - - // I am gross! - protocol.writeStructBegin("SomeRandomVector"); - - // TODO: Fix this with a trait. - protocol.writeListBegin((TType)99, vec.size()); - typename std::vector::const_iterator it; - for (it = vec.begin(); it != vec.end(); ++it) { - it->write(&protocol); - } - protocol.writeListEnd(); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} -#endif // 0 - -}} // apache::thrift - - -#endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ - - diff --git service/include/thrift/protocol/TDenseProtocol.h service/include/thrift/protocol/TDenseProtocol.h deleted file mode 100644 index 7655a47..0000000 --- service/include/thrift/protocol/TDenseProtocol.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ 1 - -#include "TBinaryProtocol.h" - -namespace apache { namespace thrift { namespace protocol { - -/** - * !!!WARNING!!! - * This class is still highly experimental. Incompatible changes - * WILL be made to it without notice. DO NOT USE IT YET unless - * you are coordinating your testing with the author. - * - * The dense protocol is designed to use as little space as possible. - * - * There are two types of dense protocol instances. Standalone instances - * are not used for RPC and just encoded and decode structures of - * a predetermined type. Non-standalone instances are used for RPC. - * Currently, only standalone instances exist. - * - * To use a standalone dense protocol object, you must set the type_spec - * property (either in the constructor, or with setTypeSpec) to the local - * reflection TypeSpec of the structures you will write to (or read from) the - * protocol instance. - * - * BEST PRACTICES: - * - Never use optional for primitives or containers. - * - Only use optional for structures if they are very big and very rarely set. - * - All integers are variable-length, so you can use i64 without bloating. - * - NEVER EVER change the struct definitions IN ANY WAY without either - * changing your cache keys or talking to dreiss. - * - * TODO(dreiss): New class write with old meta. - * - * We override all of TBinaryProtocol's methods. - * We inherit so that we can can explicitly call TBPs's primitive-writing - * methods within our versions. - * - */ -class TDenseProtocol : public TBinaryProtocol { - protected: - static const int32_t VERSION_MASK = 0xffff0000; - // VERSION_1 (0x80010000) is taken by TBinaryProtocol. - static const int32_t VERSION_2 = 0x80020000; - - public: - typedef apache::thrift::reflection::local::TypeSpec TypeSpec; - static const int FP_PREFIX_LEN; - - /** - * @param tran The transport to use. - * @param type_spec The TypeSpec of the structures using this protocol. - */ - TDenseProtocol(boost::shared_ptr trans, - TypeSpec* type_spec = NULL) : - TBinaryProtocol(trans), - type_spec_(type_spec), - standalone_(true) - {} - - void setTypeSpec(TypeSpec* type_spec) { - type_spec_ = type_spec; - } - TypeSpec* getTypeSpec() { - return type_spec_; - } - - - /* - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - virtual uint32_t writeStructBegin(const char* name); - - virtual uint32_t writeStructEnd(); - - virtual uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - virtual uint32_t writeFieldEnd(); - - virtual uint32_t writeFieldStop(); - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - virtual uint32_t writeMapEnd(); - - virtual uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeListEnd(); - - virtual uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeSetEnd(); - - virtual uint32_t writeBool(const bool value); - - virtual uint32_t writeByte(const int8_t byte); - - virtual uint32_t writeI16(const int16_t i16); - - virtual uint32_t writeI32(const int32_t i32); - - virtual uint32_t writeI64(const int64_t i64); - - virtual uint32_t writeDouble(const double dub); - - virtual uint32_t writeString(const std::string& str); - - virtual uint32_t writeBinary(const std::string& str); - - - /* - * Helper writing functions (don't do state transitions). - */ - inline uint32_t subWriteI32(const int32_t i32); - - inline uint32_t subWriteString(const std::string& str); - - uint32_t subWriteBool(const bool value) { - return TBinaryProtocol::writeBool(value); - } - - - /* - * Reading functions - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - /* - * Helper reading functions (don't do state transitions). - */ - inline uint32_t subReadI32(int32_t& i32); - - inline uint32_t subReadString(std::string& str); - - uint32_t subReadBool(bool& value) { - return TBinaryProtocol::readBool(value); - } - - - private: - - // Implementation functions, documented in the .cpp. - inline void checkTType(const TType ttype); - inline void stateTransition(); - - // Read and write variable-length integers. - // Uses the same technique as the MIDI file format. - inline uint32_t vlqRead(uint64_t& vlq); - inline uint32_t vlqWrite(uint64_t vlq); - - // Called before throwing an exception to make the object reusable. - void resetState() { - ts_stack_.clear(); - idx_stack_.clear(); - mkv_stack_.clear(); - } - - // TypeSpec of the top-level structure to write, - // for standalone protocol objects. - TypeSpec* type_spec_; - - std::vector ts_stack_; // TypeSpec stack. - std::vector idx_stack_; // InDeX stack. - std::vector mkv_stack_; // Map Key/Vlue stack. - // True = key, False = value. - - // True iff this is a standalone instance (no RPC). - bool standalone_; -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ diff --git service/include/thrift/protocol/TJSONProtocol.h service/include/thrift/protocol/TJSONProtocol.h deleted file mode 100644 index 2df499a..0000000 --- service/include/thrift/protocol/TJSONProtocol.h +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -// Forward declaration -class TJSONContext; - -/** - * JSON protocol for Thrift. - * - * Implements a protocol which uses JSON as the wire-format. - * - * Thrift types are represented as described below: - * - * 1. Every Thrift integer type is represented as a JSON number. - * - * 2. Thrift doubles are represented as JSON numbers. Some special values are - * represented as strings: - * a. "NaN" for not-a-number values - * b. "Infinity" for postive infinity - * c. "-Infinity" for negative infinity - * - * 3. Thrift string values are emitted as JSON strings, with appropriate - * escaping. - * - * 4. Thrift binary values are encoded into Base64 and emitted as JSON strings. - * The readBinary() method is written such that it will properly skip if - * called on a Thrift string (although it will decode garbage data). - * - * 5. Thrift structs are represented as JSON objects, with the field ID as the - * key, and the field value represented as a JSON object with a single - * key-value pair. The key is a short string identifier for that type, - * followed by the value. The valid type identifiers are: "tf" for bool, - * "i8" for byte, "i16" for 16-bit integer, "i32" for 32-bit integer, "i64" - * for 64-bit integer, "dbl" for double-precision loating point, "str" for - * string (including binary), "rec" for struct ("records"), "map" for map, - * "lst" for list, "set" for set. - * - * 6. Thrift lists and sets are represented as JSON arrays, with the first - * element of the JSON array being the string identifier for the Thrift - * element type and the second element of the JSON array being the count of - * the Thrift elements. The Thrift elements then follow. - * - * 7. Thrift maps are represented as JSON arrays, with the first two elements - * of the JSON array being the string identifiers for the Thrift key type - * and value type, followed by the count of the Thrift pairs, followed by a - * JSON object containing the key-value pairs. Note that JSON keys can only - * be strings, which means that the key type of the Thrift map should be - * restricted to numeric or string types -- in the case of numerics, they - * are serialized as strings. - * - * 8. Thrift messages are represented as JSON arrays, with the protocol - * version #, the message name, the message type, and the sequence ID as - * the first 4 elements. - * - * More discussion of the double handling is probably warranted. The aim of - * the current implementation is to match as closely as possible the behavior - * of Java's Double.toString(), which has no precision loss. Implementors in - * other languages should strive to achieve that where possible. I have not - * yet verified whether boost:lexical_cast, which is doing that work for me in - * C++, loses any precision, but I am leaving this as a future improvement. I - * may try to provide a C component for this, so that other languages could - * bind to the same underlying implementation for maximum consistency. - * - * Note further that JavaScript itself is not capable of representing - * floating point infinities -- presumably when we have a JavaScript Thrift - * client, this would mean that infinities get converted to not-a-number in - * transmission. I don't know of any work-around for this issue. - * - */ -class TJSONProtocol : public TProtocol { - public: - - TJSONProtocol(boost::shared_ptr ptrans); - - ~TJSONProtocol(); - - private: - - void pushContext(boost::shared_ptr c); - - void popContext(); - - uint32_t writeJSONEscapeChar(uint8_t ch); - - uint32_t writeJSONChar(uint8_t ch); - - uint32_t writeJSONString(const std::string &str); - - uint32_t writeJSONBase64(const std::string &str); - - template - uint32_t writeJSONInteger(NumberType num); - - uint32_t writeJSONDouble(double num); - - uint32_t writeJSONObjectStart() ; - - uint32_t writeJSONObjectEnd(); - - uint32_t writeJSONArrayStart(); - - uint32_t writeJSONArrayEnd(); - - uint32_t readJSONSyntaxChar(uint8_t ch); - - uint32_t readJSONEscapeChar(uint8_t *out); - - uint32_t readJSONString(std::string &str, bool skipContext = false); - - uint32_t readJSONBase64(std::string &str); - - uint32_t readJSONNumericChars(std::string &str); - - template - uint32_t readJSONInteger(NumberType &num); - - uint32_t readJSONDouble(double &num); - - uint32_t readJSONObjectStart(); - - uint32_t readJSONObjectEnd(); - - uint32_t readJSONArrayStart(); - - uint32_t readJSONArrayEnd(); - - public: - - /** - * Writing functions. - */ - - uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - uint32_t writeMessageEnd(); - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * Reading functions - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - class LookaheadReader { - - public: - - LookaheadReader(TTransport &trans) : - trans_(&trans), - hasData_(false) { - } - - uint8_t read() { - if (hasData_) { - hasData_ = false; - } - else { - trans_->readAll(&data_, 1); - } - return data_; - } - - uint8_t peek() { - if (!hasData_) { - trans_->readAll(&data_, 1); - } - hasData_ = true; - return data_; - } - - private: - TTransport *trans_; - bool hasData_; - uint8_t data_; - }; - - private: - - std::stack > contexts_; - boost::shared_ptr context_; - LookaheadReader reader_; -}; - -/** - * Constructs input and output protocol objects given transports. - */ -class TJSONProtocolFactory : public TProtocolFactory { - public: - TJSONProtocolFactory() {} - - virtual ~TJSONProtocolFactory() {} - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TJSONProtocol(trans)); - } -}; - -}}} // apache::thrift::protocol - - -// TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this. -#include - -namespace apache { namespace thrift { - -template - std::string ThriftJSONString(const ThriftStruct& ts) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TJSONProtocol protocol(trans); - - ts.write(&protocol); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} - -}} // apache::thrift - -#endif // #define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1 diff --git service/include/thrift/protocol/TOneWayProtocol.h service/include/thrift/protocol/TOneWayProtocol.h deleted file mode 100644 index 6f08fe1..0000000 --- service/include/thrift/protocol/TOneWayProtocol.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TONEWAYPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TONEWAYPROTOCOL_H_ 1 - -#include "TProtocol.h" - -namespace apache { namespace thrift { namespace protocol { - -/** - * Abstract class for implementing a protocol that can only be written, - * not read. - * - */ -class TWriteOnlyProtocol : public TProtocol { - public: - /** - * @param subclass_name The name of the concrete subclass. - */ - TWriteOnlyProtocol(boost::shared_ptr trans, - const std::string& subclass_name) - : TProtocol(trans) - , subclass_(subclass_name) - {} - - // All writing functions remain abstract. - - /** - * Reading functions all throw an exception. - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMessageEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readStructBegin(std::string& name) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readStructEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readFieldEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMapEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readListBegin(TType& elemType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readListEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readSetBegin(TType& elemType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readSetEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readBool(bool& value) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readByte(int8_t& byte) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI16(int16_t& i16) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI32(int32_t& i32) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI64(int64_t& i64) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readDouble(double& dub) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readString(std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readBinary(std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - private: - std::string subclass_; -}; - - -/** - * Abstract class for implementing a protocol that can only be read, - * not written. - * - */ -class TReadOnlyProtocol : public TProtocol { - public: - /** - * @param subclass_name The name of the concrete subclass. - */ - TReadOnlyProtocol(boost::shared_ptr trans, - const std::string& subclass_name) - : TProtocol(trans) - , subclass_(subclass_name) - {} - - // All reading functions remain abstract. - - /** - * Writing functions all throw an exception. - */ - - uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMessageEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - - uint32_t writeStructBegin(const char* name) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeStructEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldStop() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMapEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeListBegin(const TType elemType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeListEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeSetEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeBool(const bool value) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeByte(const int8_t byte) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI16(const int16_t i16) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI32(const int32_t i32) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI64(const int64_t i64) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeDouble(const double dub) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeString(const std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeBinary(const std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - private: - std::string subclass_; -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ diff --git service/include/thrift/protocol/TProtocol.h service/include/thrift/protocol/TProtocol.h deleted file mode 100644 index 4025827..0000000 --- service/include/thrift/protocol/TProtocol.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1 - -#include -#include - -#include -#include - -#include -#include -#include -#include - - -// Use this to get around strict aliasing rules. -// For example, uint64_t i = bitwise_cast(returns_double()); -// The most obvious implementation is to just cast a pointer, -// but that doesn't work. -// For a pretty in-depth explanation of the problem, see -// http://www.cellperformance.com/mike_acton/2006/06/ (...) -// understanding_strict_aliasing.html -template -static inline To bitwise_cast(From from) { - BOOST_STATIC_ASSERT(sizeof(From) == sizeof(To)); - - // BAD!!! These are all broken with -O2. - //return *reinterpret_cast(&from); // BAD!!! - //return *static_cast(static_cast(&from)); // BAD!!! - //return *(To*)(void*)&from; // BAD!!! - - // Super clean and paritally blessed by section 3.9 of the standard. - //unsigned char c[sizeof(from)]; - //memcpy(c, &from, sizeof(from)); - //To to; - //memcpy(&to, c, sizeof(c)); - //return to; - - // Slightly more questionable. - // Same code emitted by GCC. - //To to; - //memcpy(&to, &from, sizeof(from)); - //return to; - - // Technically undefined, but almost universally supported, - // and the most efficient implementation. - union { - From f; - To t; - } u; - u.f = from; - return u.t; -} - - -namespace apache { namespace thrift { namespace protocol { - -using apache::thrift::transport::TTransport; - -#ifdef HAVE_ENDIAN_H -#include -#endif - -#ifndef __BYTE_ORDER -# if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) -# define __BYTE_ORDER BYTE_ORDER -# define __LITTLE_ENDIAN LITTLE_ENDIAN -# define __BIG_ENDIAN BIG_ENDIAN -# else -# error "Cannot determine endianness" -# endif -#endif - -#if __BYTE_ORDER == __BIG_ENDIAN -# define ntohll(n) (n) -# define htonll(n) (n) -# if defined(__GNUC__) && defined(__GLIBC__) -# include -# define htolell(n) bswap_64(n) -# define letohll(n) bswap_64(n) -# else /* GNUC & GLIBC */ -# define bswap_64(n) \ - ( (((n) & 0xff00000000000000ull) >> 56) \ - | (((n) & 0x00ff000000000000ull) >> 40) \ - | (((n) & 0x0000ff0000000000ull) >> 24) \ - | (((n) & 0x000000ff00000000ull) >> 8) \ - | (((n) & 0x00000000ff000000ull) << 8) \ - | (((n) & 0x0000000000ff0000ull) << 24) \ - | (((n) & 0x000000000000ff00ull) << 40) \ - | (((n) & 0x00000000000000ffull) << 56) ) -# define ntolell(n) bswap_64(n) -# define letonll(n) bswap_64(n) -# endif /* GNUC & GLIBC */ -#elif __BYTE_ORDER == __LITTLE_ENDIAN -# define htolell(n) (n) -# define letohll(n) (n) -# if defined(__GNUC__) && defined(__GLIBC__) -# include -# define ntohll(n) bswap_64(n) -# define htonll(n) bswap_64(n) -# else /* GNUC & GLIBC */ -# define ntohll(n) ( (((unsigned long long)ntohl(n)) << 32) + ntohl(n >> 32) ) -# define htonll(n) ( (((unsigned long long)htonl(n)) << 32) + htonl(n >> 32) ) -# endif /* GNUC & GLIBC */ -#else /* __BYTE_ORDER */ -# error "Can't define htonll or ntohll!" -#endif - -/** - * Enumerated definition of the types that the Thrift protocol supports. - * Take special note of the T_END type which is used specifically to mark - * the end of a sequence of fields. - */ -enum TType { - T_STOP = 0, - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I08 = 3, - T_I16 = 6, - T_I32 = 8, - T_U64 = 9, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_UTF7 = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - T_UTF8 = 16, - T_UTF16 = 17 -}; - -/** - * Enumerated definition of the message types that the Thrift protocol - * supports. - */ -enum TMessageType { - T_CALL = 1, - T_REPLY = 2, - T_EXCEPTION = 3, - T_ONEWAY = 4 -}; - -/** - * Abstract class for a thrift protocol driver. These are all the methods that - * a protocol must implement. Essentially, there must be some way of reading - * and writing all the base types, plus a mechanism for writing out structs - * with indexed fields. - * - * TProtocol objects should not be shared across multiple encoding contexts, - * as they may need to maintain internal state in some protocols (i.e. XML). - * Note that is is acceptable for the TProtocol module to do its own internal - * buffered reads/writes to the underlying TTransport where appropriate (i.e. - * when parsing an input XML stream, reading should be batched rather than - * looking ahead character by character for a close tag). - * - */ -class TProtocol { - public: - virtual ~TProtocol() {} - - /** - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid) = 0; - - virtual uint32_t writeMessageEnd() = 0; - - - virtual uint32_t writeStructBegin(const char* name) = 0; - - virtual uint32_t writeStructEnd() = 0; - - virtual uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId) = 0; - - virtual uint32_t writeFieldEnd() = 0; - - virtual uint32_t writeFieldStop() = 0; - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size) = 0; - - virtual uint32_t writeMapEnd() = 0; - - virtual uint32_t writeListBegin(const TType elemType, - const uint32_t size) = 0; - - virtual uint32_t writeListEnd() = 0; - - virtual uint32_t writeSetBegin(const TType elemType, - const uint32_t size) = 0; - - virtual uint32_t writeSetEnd() = 0; - - virtual uint32_t writeBool(const bool value) = 0; - - virtual uint32_t writeByte(const int8_t byte) = 0; - - virtual uint32_t writeI16(const int16_t i16) = 0; - - virtual uint32_t writeI32(const int32_t i32) = 0; - - virtual uint32_t writeI64(const int64_t i64) = 0; - - virtual uint32_t writeDouble(const double dub) = 0; - - virtual uint32_t writeString(const std::string& str) = 0; - - virtual uint32_t writeBinary(const std::string& str) = 0; - - /** - * Reading functions - */ - - virtual uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) = 0; - - virtual uint32_t readMessageEnd() = 0; - - virtual uint32_t readStructBegin(std::string& name) = 0; - - virtual uint32_t readStructEnd() = 0; - - virtual uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) = 0; - - virtual uint32_t readFieldEnd() = 0; - - virtual uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) = 0; - - virtual uint32_t readMapEnd() = 0; - - virtual uint32_t readListBegin(TType& elemType, - uint32_t& size) = 0; - - virtual uint32_t readListEnd() = 0; - - virtual uint32_t readSetBegin(TType& elemType, - uint32_t& size) = 0; - - virtual uint32_t readSetEnd() = 0; - - virtual uint32_t readBool(bool& value) = 0; - - virtual uint32_t readByte(int8_t& byte) = 0; - - virtual uint32_t readI16(int16_t& i16) = 0; - - virtual uint32_t readI32(int32_t& i32) = 0; - - virtual uint32_t readI64(int64_t& i64) = 0; - - virtual uint32_t readDouble(double& dub) = 0; - - virtual uint32_t readString(std::string& str) = 0; - - virtual uint32_t readBinary(std::string& str) = 0; - - uint32_t readBool(std::vector::reference ref) { - bool value; - uint32_t rv = readBool(value); - ref = value; - return rv; - } - - /** - * Method to arbitrarily skip over data. - */ - uint32_t skip(TType type) { - switch (type) { - case T_BOOL: - { - bool boolv; - return readBool(boolv); - } - case T_BYTE: - { - int8_t bytev; - return readByte(bytev); - } - case T_I16: - { - int16_t i16; - return readI16(i16); - } - case T_I32: - { - int32_t i32; - return readI32(i32); - } - case T_I64: - { - int64_t i64; - return readI64(i64); - } - case T_DOUBLE: - { - double dub; - return readDouble(dub); - } - case T_STRING: - { - std::string str; - return readBinary(str); - } - case T_STRUCT: - { - uint32_t result = 0; - std::string name; - int16_t fid; - TType ftype; - result += readStructBegin(name); - while (true) { - result += readFieldBegin(name, ftype, fid); - if (ftype == T_STOP) { - break; - } - result += skip(ftype); - result += readFieldEnd(); - } - result += readStructEnd(); - return result; - } - case T_MAP: - { - uint32_t result = 0; - TType keyType; - TType valType; - uint32_t i, size; - result += readMapBegin(keyType, valType, size); - for (i = 0; i < size; i++) { - result += skip(keyType); - result += skip(valType); - } - result += readMapEnd(); - return result; - } - case T_SET: - { - uint32_t result = 0; - TType elemType; - uint32_t i, size; - result += readSetBegin(elemType, size); - for (i = 0; i < size; i++) { - result += skip(elemType); - } - result += readSetEnd(); - return result; - } - case T_LIST: - { - uint32_t result = 0; - TType elemType; - uint32_t i, size; - result += readListBegin(elemType, size); - for (i = 0; i < size; i++) { - result += skip(elemType); - } - result += readListEnd(); - return result; - } - default: - return 0; - } - } - - inline boost::shared_ptr getTransport() { - return ptrans_; - } - - // TODO: remove these two calls, they are for backwards - // compatibility - inline boost::shared_ptr getInputTransport() { - return ptrans_; - } - inline boost::shared_ptr getOutputTransport() { - return ptrans_; - } - - protected: - TProtocol(boost::shared_ptr ptrans): - ptrans_(ptrans) { - trans_ = ptrans.get(); - } - - boost::shared_ptr ptrans_; - TTransport* trans_; - - private: - TProtocol() {} -}; - -/** - * Constructs input and output protocol objects given transports. - */ -class TProtocolFactory { - public: - TProtocolFactory() {} - - virtual ~TProtocolFactory() {} - - virtual boost::shared_ptr getProtocol(boost::shared_ptr trans) = 0; -}; - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1 diff --git service/include/thrift/protocol/TProtocolException.h service/include/thrift/protocol/TProtocolException.h deleted file mode 100644 index 33011b3..0000000 --- service/include/thrift/protocol/TProtocolException.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ -#define _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ 1 - -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * Class to encapsulate all the possible types of protocol errors that may - * occur in various protocol systems. This provides a sort of generic - * wrapper around the shitty UNIX E_ error codes that lets a common code - * base of error handling to be used for various types of protocols, i.e. - * pipes etc. - * - */ -class TProtocolException : public apache::thrift::TException { - public: - - /** - * Error codes for the various types of exceptions. - */ - enum TProtocolExceptionType - { UNKNOWN = 0 - , INVALID_DATA = 1 - , NEGATIVE_SIZE = 2 - , SIZE_LIMIT = 3 - , BAD_VERSION = 4 - , NOT_IMPLEMENTED = 5 - }; - - TProtocolException() : - apache::thrift::TException(), - type_(UNKNOWN) {} - - TProtocolException(TProtocolExceptionType type) : - apache::thrift::TException(), - type_(type) {} - - TProtocolException(const std::string& message) : - apache::thrift::TException(message), - type_(UNKNOWN) {} - - TProtocolException(TProtocolExceptionType type, const std::string& message) : - apache::thrift::TException(message), - type_(type) {} - - virtual ~TProtocolException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TProtocolExceptionType getType() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TProtocolException: Unknown protocol exception"; - case INVALID_DATA : return "TProtocolException: Invalid data"; - case NEGATIVE_SIZE : return "TProtocolException: Negative size"; - case SIZE_LIMIT : return "TProtocolException: Exceeded size limit"; - case BAD_VERSION : return "TProtocolException: Invalid version"; - case NOT_IMPLEMENTED : return "TProtocolException: Not implemented"; - default : return "TProtocolException: (Invalid exception type)"; - } - } else { - return message_.c_str(); - } - } - - protected: - /** - * Error code - */ - TProtocolExceptionType type_; - -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ diff --git service/include/thrift/protocol/TProtocolTap.h service/include/thrift/protocol/TProtocolTap.h deleted file mode 100644 index 5580216..0000000 --- service/include/thrift/protocol/TProtocolTap.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ -#define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1 - -#include - -namespace apache { namespace thrift { namespace protocol { - -using apache::thrift::transport::TTransport; - -/** - * Puts a wiretap on a protocol object. Any reads to this class are passed - * through to an enclosed protocol object, but also mirrored as write to a - * second protocol object. - * - */ -class TProtocolTap : public TReadOnlyProtocol { - public: - TProtocolTap(boost::shared_ptr source, - boost::shared_ptr sink) - : TReadOnlyProtocol(source->getTransport(), "TProtocolTap") - , source_(source) - , sink_(sink) - {} - - virtual uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) { - uint32_t rv = source_->readMessageBegin(name, messageType, seqid); - sink_->writeMessageBegin(name, messageType, seqid); - return rv; - } - - virtual uint32_t readMessageEnd() { - uint32_t rv = source_->readMessageEnd(); - sink_->writeMessageEnd(); - return rv; - } - - virtual uint32_t readStructBegin(std::string& name) { - uint32_t rv = source_->readStructBegin(name); - sink_->writeStructBegin(name.c_str()); - return rv; - } - - virtual uint32_t readStructEnd() { - uint32_t rv = source_->readStructEnd(); - sink_->writeStructEnd(); - return rv; - } - - virtual uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) { - uint32_t rv = source_->readFieldBegin(name, fieldType, fieldId); - if (fieldType == T_STOP) { - sink_->writeFieldStop(); - } else { - sink_->writeFieldBegin(name.c_str(), fieldType, fieldId); - } - return rv; - } - - - virtual uint32_t readFieldEnd() { - uint32_t rv = source_->readFieldEnd(); - sink_->writeFieldEnd(); - return rv; - } - - virtual uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) { - uint32_t rv = source_->readMapBegin(keyType, valType, size); - sink_->writeMapBegin(keyType, valType, size); - return rv; - } - - - virtual uint32_t readMapEnd() { - uint32_t rv = source_->readMapEnd(); - sink_->writeMapEnd(); - return rv; - } - - virtual uint32_t readListBegin(TType& elemType, - uint32_t& size) { - uint32_t rv = source_->readListBegin(elemType, size); - sink_->writeListBegin(elemType, size); - return rv; - } - - - virtual uint32_t readListEnd() { - uint32_t rv = source_->readListEnd(); - sink_->writeListEnd(); - return rv; - } - - virtual uint32_t readSetBegin(TType& elemType, - uint32_t& size) { - uint32_t rv = source_->readSetBegin(elemType, size); - sink_->writeSetBegin(elemType, size); - return rv; - } - - - virtual uint32_t readSetEnd() { - uint32_t rv = source_->readSetEnd(); - sink_->writeSetEnd(); - return rv; - } - - virtual uint32_t readBool(bool& value) { - uint32_t rv = source_->readBool(value); - sink_->writeBool(value); - return rv; - } - - virtual uint32_t readByte(int8_t& byte) { - uint32_t rv = source_->readByte(byte); - sink_->writeByte(byte); - return rv; - } - - virtual uint32_t readI16(int16_t& i16) { - uint32_t rv = source_->readI16(i16); - sink_->writeI16(i16); - return rv; - } - - virtual uint32_t readI32(int32_t& i32) { - uint32_t rv = source_->readI32(i32); - sink_->writeI32(i32); - return rv; - } - - virtual uint32_t readI64(int64_t& i64) { - uint32_t rv = source_->readI64(i64); - sink_->writeI64(i64); - return rv; - } - - virtual uint32_t readDouble(double& dub) { - uint32_t rv = source_->readDouble(dub); - sink_->writeDouble(dub); - return rv; - } - - virtual uint32_t readString(std::string& str) { - uint32_t rv = source_->readString(str); - sink_->writeString(str); - return rv; - } - - virtual uint32_t readBinary(std::string& str) { - uint32_t rv = source_->readBinary(str); - sink_->writeBinary(str); - return rv; - } - - private: - boost::shared_ptr source_; - boost::shared_ptr sink_; -}; - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1 diff --git service/include/thrift/reflection_limited_types.h service/include/thrift/reflection_limited_types.h deleted file mode 100644 index 677cb4a..0000000 --- service/include/thrift/reflection_limited_types.h +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef reflection_limited_TYPES_H -#define reflection_limited_TYPES_H - -#include -#include -#include -#include - - - -namespace facebook { namespace thrift { namespace reflection { namespace limited { - -enum TTypeTag { - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I16 = 6, - T_I32 = 8, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - T_ENUM = 101, - T_NOT_REFLECTED = 102 -}; - -class SimpleType { - public: - - static char* ascii_fingerprint; // = "19B5240589E680301A7E32DF3971EFBE"; - static char binary_fingerprint[16]; // = {0x19,0xB5,0x24,0x05,0x89,0xE6,0x80,0x30,0x1A,0x7E,0x32,0xDF,0x39,0x71,0xEF,0xBE}; - - SimpleType() : name("") { - } - - virtual ~SimpleType() throw() {} - - TTypeTag ttype; - std::string name; - - struct __isset { - __isset() : ttype(false), name(false) {} - bool ttype; - bool name; - } __isset; - - bool operator == (const SimpleType & rhs) const - { - if (!(ttype == rhs.ttype)) - return false; - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const SimpleType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class ContainerType { - public: - - static char* ascii_fingerprint; // = "654FA6EFFF8242F4C2A604B970686634"; - static char binary_fingerprint[16]; // = {0x65,0x4F,0xA6,0xEF,0xFF,0x82,0x42,0xF4,0xC2,0xA6,0x04,0xB9,0x70,0x68,0x66,0x34}; - - ContainerType() { - } - - virtual ~ContainerType() throw() {} - - TTypeTag ttype; - SimpleType subtype1; - SimpleType subtype2; - - struct __isset { - __isset() : ttype(false), subtype1(false), subtype2(false) {} - bool ttype; - bool subtype1; - bool subtype2; - } __isset; - - bool operator == (const ContainerType & rhs) const - { - if (!(ttype == rhs.ttype)) - return false; - if (!(subtype1 == rhs.subtype1)) - return false; - if (__isset.subtype2 != rhs.__isset.subtype2) - return false; - else if (__isset.subtype2 && !(subtype2 == rhs.subtype2)) - return false; - return true; - } - bool operator != (const ContainerType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftType { - public: - - static char* ascii_fingerprint; // = "76BC1CC759001D7D85FEE75C4F183062"; - static char binary_fingerprint[16]; // = {0x76,0xBC,0x1C,0xC7,0x59,0x00,0x1D,0x7D,0x85,0xFE,0xE7,0x5C,0x4F,0x18,0x30,0x62}; - - ThriftType() : is_container(0) { - } - - virtual ~ThriftType() throw() {} - - bool is_container; - SimpleType simple_type; - ContainerType container_type; - - struct __isset { - __isset() : is_container(false), simple_type(false), container_type(false) {} - bool is_container; - bool simple_type; - bool container_type; - } __isset; - - bool operator == (const ThriftType & rhs) const - { - if (!(is_container == rhs.is_container)) - return false; - if (__isset.simple_type != rhs.__isset.simple_type) - return false; - else if (__isset.simple_type && !(simple_type == rhs.simple_type)) - return false; - if (__isset.container_type != rhs.__isset.container_type) - return false; - else if (__isset.container_type && !(container_type == rhs.container_type)) - return false; - return true; - } - bool operator != (const ThriftType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Argument { - public: - - static char* ascii_fingerprint; // = "8C45506BE0EFBB22FB19FA40DDCECB3F"; - static char binary_fingerprint[16]; // = {0x8C,0x45,0x50,0x6B,0xE0,0xEF,0xBB,0x22,0xFB,0x19,0xFA,0x40,0xDD,0xCE,0xCB,0x3F}; - - Argument() : key(0), name("") { - } - - virtual ~Argument() throw() {} - - int16_t key; - std::string name; - ThriftType type; - - struct __isset { - __isset() : key(false), name(false), type(false) {} - bool key; - bool name; - bool type; - } __isset; - - bool operator == (const Argument & rhs) const - { - if (!(key == rhs.key)) - return false; - if (!(name == rhs.name)) - return false; - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const Argument &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Method { - public: - - static char* ascii_fingerprint; // = "E6573428C492D24C84A19432D39A17B0"; - static char binary_fingerprint[16]; // = {0xE6,0x57,0x34,0x28,0xC4,0x92,0xD2,0x4C,0x84,0xA1,0x94,0x32,0xD3,0x9A,0x17,0xB0}; - - Method() : name("") { - } - - virtual ~Method() throw() {} - - std::string name; - ThriftType return_type; - std::vector arguments; - - struct __isset { - __isset() : name(false), return_type(false), arguments(false) {} - bool name; - bool return_type; - bool arguments; - } __isset; - - bool operator == (const Method & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(return_type == rhs.return_type)) - return false; - if (!(arguments == rhs.arguments)) - return false; - return true; - } - bool operator != (const Method &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Service { - public: - - static char* ascii_fingerprint; // = "4673B0777B701D9B02A7A74CEC7908A7"; - static char binary_fingerprint[16]; // = {0x46,0x73,0xB0,0x77,0x7B,0x70,0x1D,0x9B,0x02,0xA7,0xA7,0x4C,0xEC,0x79,0x08,0xA7}; - - Service() : name(""), fully_reflected(0) { - } - - virtual ~Service() throw() {} - - std::string name; - std::vector methods; - bool fully_reflected; - - struct __isset { - __isset() : name(false), methods(false), fully_reflected(false) {} - bool name; - bool methods; - bool fully_reflected; - } __isset; - - bool operator == (const Service & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(methods == rhs.methods)) - return false; - if (!(fully_reflected == rhs.fully_reflected)) - return false; - return true; - } - bool operator != (const Service &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -}}}} // namespace - -#endif diff --git service/include/thrift/server/TNonblockingServer.h service/include/thrift/server/TNonblockingServer.h deleted file mode 100644 index 8506507..0000000 --- service/include/thrift/server/TNonblockingServer.h +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ -#define _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::transport::TMemoryBuffer; -using apache::thrift::protocol::TProtocol; -using apache::thrift::concurrency::Runnable; -using apache::thrift::concurrency::ThreadManager; - -// Forward declaration of class -class TConnection; - -/** - * This is a non-blocking server in C++ for high performance that operates a - * single IO thread. It assumes that all incoming requests are framed with a - * 4 byte length indicator and writes out responses using the same framing. - * - * It does not use the TServerTransport framework, but rather has socket - * operations hardcoded for use with select. - * - */ -class TNonblockingServer : public TServer { - private: - - // Listen backlog - static const int LISTEN_BACKLOG = 1024; - - // Default limit on size of idle connection pool - static const size_t CONNECTION_STACK_LIMIT = 1024; - - // Maximum size of buffer allocated to idle connection - static const uint32_t IDLE_BUFFER_MEM_LIMIT = 8192; - - // Server socket file descriptor - int serverSocket_; - - // Port server runs on - int port_; - - // For processing via thread pool, may be NULL - boost::shared_ptr threadManager_; - - // Is thread pool processing? - bool threadPoolProcessing_; - - // The event base for libevent - event_base* eventBase_; - - // Event struct, for use with eventBase_ - struct event serverEvent_; - - // Number of TConnection object we've created - size_t numTConnections_; - - // Limit for how many TConnection objects to cache - size_t connectionStackLimit_; - - /** - * Max read buffer size for an idle connection. When we place an idle - * TConnection into connectionStack_, we insure that its read buffer is - * reduced to this size to insure that idle connections don't hog memory. - */ - uint32_t idleBufferMemLimit_; - - /** - * This is a stack of all the objects that have been created but that - * are NOT currently in use. When we close a connection, we place it on this - * stack so that the object can be reused later, rather than freeing the - * memory and reallocating a new object later. - */ - std::stack connectionStack_; - - void handleEvent(int fd, short which); - - public: - TNonblockingServer(boost::shared_ptr processor, - int port) : - TServer(processor), - serverSocket_(-1), - port_(port), - threadPoolProcessing_(false), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) {} - - TNonblockingServer(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - int port, - boost::shared_ptr threadManager = boost::shared_ptr()) : - TServer(processor), - serverSocket_(-1), - port_(port), - threadManager_(threadManager), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(protocolFactory); - setOutputProtocolFactory(protocolFactory); - setThreadManager(threadManager); - } - - TNonblockingServer(boost::shared_ptr processor, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - int port, - boost::shared_ptr threadManager = boost::shared_ptr()) : - TServer(processor), - serverSocket_(0), - port_(port), - threadManager_(threadManager), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) { - setInputTransportFactory(inputTransportFactory); - setOutputTransportFactory(outputTransportFactory); - setInputProtocolFactory(inputProtocolFactory); - setOutputProtocolFactory(outputProtocolFactory); - setThreadManager(threadManager); - } - - ~TNonblockingServer() {} - - void setThreadManager(boost::shared_ptr threadManager) { - threadManager_ = threadManager; - threadPoolProcessing_ = (threadManager != NULL); - } - - boost::shared_ptr getThreadManager() { - return threadManager_; - } - - /** - * Get the maximum number of unused TConnection we will hold in reserve. - * - * @return the current limit on TConnection pool size. - */ - size_t getConnectionStackLimit() const { - return connectionStackLimit_; - } - - /** - * Set the maximum number of unused TConnection we will hold in reserve. - * - * @param sz the new limit for TConnection pool size. - */ - void setConnectionStackLimit(size_t sz) { - connectionStackLimit_ = sz; - } - - bool isThreadPoolProcessing() const { - return threadPoolProcessing_; - } - - void addTask(boost::shared_ptr task) { - threadManager_->add(task); - } - - event_base* getEventBase() const { - return eventBase_; - } - - void incrementNumConnections() { - ++numTConnections_; - } - - void decrementNumConnections() { - --numTConnections_; - } - - size_t getNumConnections() { - return numTConnections_; - } - - size_t getNumIdleConnections() { - return connectionStack_.size(); - } - - /** - * Get the maximum limit of memory allocated to idle TConnection objects. - * - * @return # bytes beyond which we will shrink buffers when idle. - */ - size_t getIdleBufferMemLimit() const { - return idleBufferMemLimit_; - } - - /** - * Set the maximum limit of memory allocated to idle TConnection objects. - * If a TConnection object goes idle with more than this much memory - * allocated to its buffer, we shrink it to this value. - * - * @param limit of bytes beyond which we will shrink buffers when idle. - */ - void setIdleBufferMemLimit(size_t limit) { - idleBufferMemLimit_ = limit; - } - - TConnection* createConnection(int socket, short flags); - - void returnConnection(TConnection* connection); - - static void eventHandler(int fd, short which, void* v) { - ((TNonblockingServer*)v)->handleEvent(fd, which); - } - - void listenSocket(); - - void listenSocket(int fd); - - void registerEvents(event_base* base); - - void serve(); -}; - -/** - * Two states for sockets, recv and send mode - */ -enum TSocketState { - SOCKET_RECV, - SOCKET_SEND -}; - -/** - * Four states for the nonblocking servr: - * 1) initialize - * 2) read 4 byte frame size - * 3) read frame of data - * 4) send back data (if any) - */ -enum TAppState { - APP_INIT, - APP_READ_FRAME_SIZE, - APP_READ_REQUEST, - APP_WAIT_TASK, - APP_SEND_RESULT -}; - -/** - * Represents a connection that is handled via libevent. This connection - * essentially encapsulates a socket that has some associated libevent state. - */ -class TConnection { - private: - - class Task; - - // Server handle - TNonblockingServer* server_; - - // Socket handle - int socket_; - - // Libevent object - struct event event_; - - // Libevent flags - short eventFlags_; - - // Socket mode - TSocketState socketState_; - - // Application state - TAppState appState_; - - // How much data needed to read - uint32_t readWant_; - - // Where in the read buffer are we - uint32_t readBufferPos_; - - // Read buffer - uint8_t* readBuffer_; - - // Read buffer size - uint32_t readBufferSize_; - - // Write buffer - uint8_t* writeBuffer_; - - // Write buffer size - uint32_t writeBufferSize_; - - // How far through writing are we? - uint32_t writeBufferPos_; - - // How many times have we read since our last buffer reset? - uint32_t numReadsSinceReset_; - - // How many times have we written since our last buffer reset? - uint32_t numWritesSinceReset_; - - // Task handle - int taskHandle_; - - // Task event - struct event taskEvent_; - - // Transport to read from - boost::shared_ptr inputTransport_; - - // Transport that processor writes to - boost::shared_ptr outputTransport_; - - // extra transport generated by transport factory (e.g. BufferedRouterTransport) - boost::shared_ptr factoryInputTransport_; - boost::shared_ptr factoryOutputTransport_; - - // Protocol decoder - boost::shared_ptr inputProtocol_; - - // Protocol encoder - boost::shared_ptr outputProtocol_; - - // Go into read mode - void setRead() { - setFlags(EV_READ | EV_PERSIST); - } - - // Go into write mode - void setWrite() { - setFlags(EV_WRITE | EV_PERSIST); - } - - // Set socket idle - void setIdle() { - setFlags(0); - } - - // Set event flags - void setFlags(short eventFlags); - - // Libevent handlers - void workSocket(); - - // Close this client and reset - void close(); - - public: - - // Constructor - TConnection(int socket, short eventFlags, TNonblockingServer *s) { - readBuffer_ = (uint8_t*)std::malloc(1024); - if (readBuffer_ == NULL) { - throw new apache::thrift::TException("Out of memory."); - } - readBufferSize_ = 1024; - - numReadsSinceReset_ = 0; - numWritesSinceReset_ = 0; - - // Allocate input and output tranpsorts - // these only need to be allocated once per TConnection (they don't need to be - // reallocated on init() call) - inputTransport_ = boost::shared_ptr(new TMemoryBuffer(readBuffer_, readBufferSize_)); - outputTransport_ = boost::shared_ptr(new TMemoryBuffer()); - - init(socket, eventFlags, s); - server_->incrementNumConnections(); - } - - ~TConnection() { - server_->decrementNumConnections(); - } - - /** - * Check read buffer against a given limit and shrink it if exceeded. - * - * @param limit we limit buffer size to. - */ - void checkIdleBufferMemLimit(uint32_t limit); - - // Initialize - void init(int socket, short eventFlags, TNonblockingServer *s); - - // Transition into a new state - void transition(); - - // Handler wrapper - static void eventHandler(int fd, short /* which */, void* v) { - assert(fd == ((TConnection*)v)->socket_); - ((TConnection*)v)->workSocket(); - } - - // Handler wrapper for task block - static void taskHandler(int fd, short /* which */, void* v) { - assert(fd == ((TConnection*)v)->taskHandle_); - if (-1 == ::close(((TConnection*)v)->taskHandle_)) { - GlobalOutput.perror("TConnection::taskHandler close handle failed, resource leak ", errno); - } - ((TConnection*)v)->transition(); - } - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ diff --git service/include/thrift/server/TServer.h service/include/thrift/server/TServer.h deleted file mode 100644 index 5c4c588..0000000 --- service/include/thrift/server/TServer.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_TSERVER_H_ -#define _THRIFT_SERVER_TSERVER_H_ 1 - -#include -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::TProcessor; -using apache::thrift::protocol::TBinaryProtocolFactory; -using apache::thrift::protocol::TProtocol; -using apache::thrift::protocol::TProtocolFactory; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransport; -using apache::thrift::transport::TTransportFactory; - -/** - * Virtual interface class that can handle events from the server core. To - * use this you should subclass it and implement the methods that you care - * about. Your subclass can also store local data that you may care about, - * such as additional "arguments" to these methods (stored in the object - * instance's state). - */ -class TServerEventHandler { - public: - - virtual ~TServerEventHandler() {} - - /** - * Called before the server begins. - */ - virtual void preServe() {} - - /** - * Called when a new client has connected and is about to being processing. - */ - virtual void clientBegin(boost::shared_ptr /* input */, - boost::shared_ptr /* output */) {} - - /** - * Called when a client has finished making requests. - */ - virtual void clientEnd(boost::shared_ptr /* input */, - boost::shared_ptr /* output */) {} - - protected: - - /** - * Prevent direct instantiation. - */ - TServerEventHandler() {} - -}; - -/** - * Thrift server. - * - */ -class TServer : public concurrency::Runnable { - public: - - virtual ~TServer() {} - - virtual void serve() = 0; - - virtual void stop() {} - - // Allows running the server as a Runnable thread - virtual void run() { - serve(); - } - - boost::shared_ptr getProcessor() { - return processor_; - } - - boost::shared_ptr getServerTransport() { - return serverTransport_; - } - - boost::shared_ptr getInputTransportFactory() { - return inputTransportFactory_; - } - - boost::shared_ptr getOutputTransportFactory() { - return outputTransportFactory_; - } - - boost::shared_ptr getInputProtocolFactory() { - return inputProtocolFactory_; - } - - boost::shared_ptr getOutputProtocolFactory() { - return outputProtocolFactory_; - } - - boost::shared_ptr getEventHandler() { - return eventHandler_; - } - -protected: - TServer(boost::shared_ptr processor): - processor_(processor) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - setOutputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - } - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport): - processor_(processor), - serverTransport_(serverTransport) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - setOutputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - } - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory): - processor_(processor), - serverTransport_(serverTransport), - inputTransportFactory_(transportFactory), - outputTransportFactory_(transportFactory), - inputProtocolFactory_(protocolFactory), - outputProtocolFactory_(protocolFactory) {} - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory): - processor_(processor), - serverTransport_(serverTransport), - inputTransportFactory_(inputTransportFactory), - outputTransportFactory_(outputTransportFactory), - inputProtocolFactory_(inputProtocolFactory), - outputProtocolFactory_(outputProtocolFactory) {} - - - // Class variables - boost::shared_ptr processor_; - boost::shared_ptr serverTransport_; - - boost::shared_ptr inputTransportFactory_; - boost::shared_ptr outputTransportFactory_; - - boost::shared_ptr inputProtocolFactory_; - boost::shared_ptr outputProtocolFactory_; - - boost::shared_ptr eventHandler_; - -public: - void setInputTransportFactory(boost::shared_ptr inputTransportFactory) { - inputTransportFactory_ = inputTransportFactory; - } - - void setOutputTransportFactory(boost::shared_ptr outputTransportFactory) { - outputTransportFactory_ = outputTransportFactory; - } - - void setInputProtocolFactory(boost::shared_ptr inputProtocolFactory) { - inputProtocolFactory_ = inputProtocolFactory; - } - - void setOutputProtocolFactory(boost::shared_ptr outputProtocolFactory) { - outputProtocolFactory_ = outputProtocolFactory; - } - - void setServerEventHandler(boost::shared_ptr eventHandler) { - eventHandler_ = eventHandler; - } - -}; - -/** - * Helper function to increase the max file descriptors limit - * for the current process and all of its children. - * By default, tries to increase it to as much as 2^24. - */ - int increase_max_fds(int max_fds=(1<<24)); - - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSERVER_H_ diff --git service/include/thrift/server/TSimpleServer.h service/include/thrift/server/TSimpleServer.h deleted file mode 100644 index c4fc91c..0000000 --- service/include/thrift/server/TSimpleServer.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ -#define _THRIFT_SERVER_TSIMPLESERVER_H_ 1 - -#include "server/TServer.h" -#include "transport/TServerTransport.h" - -namespace apache { namespace thrift { namespace server { - -/** - * This is the most basic simple server. It is single-threaded and runs a - * continuous loop of accepting a single connection, processing requests on - * that connection until it closes, and then repeating. It is a good example - * of how to extend the TServer interface. - * - */ -class TSimpleServer : public TServer { - public: - TSimpleServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory) : - TServer(processor, serverTransport, transportFactory, protocolFactory), - stop_(false) {} - - TSimpleServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory): - TServer(processor, serverTransport, - inputTransportFactory, outputTransportFactory, - inputProtocolFactory, outputProtocolFactory), - stop_(false) {} - - ~TSimpleServer() {} - - void serve(); - - void stop() { - stop_ = true; - } - - protected: - bool stop_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ diff --git service/include/thrift/server/TThreadPoolServer.h service/include/thrift/server/TThreadPoolServer.h deleted file mode 100644 index 7b7e906..0000000 --- service/include/thrift/server/TThreadPoolServer.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ -#define _THRIFT_SERVER_TTHREADPOOLSERVER_H_ 1 - -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::concurrency::ThreadManager; -using apache::thrift::protocol::TProtocolFactory; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransportFactory; - -class TThreadPoolServer : public TServer { - public: - class Task; - - TThreadPoolServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory, - boost::shared_ptr threadManager); - - TThreadPoolServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - boost::shared_ptr threadManager); - - virtual ~TThreadPoolServer(); - - virtual void serve(); - - virtual int64_t getTimeout() const; - - virtual void setTimeout(int64_t value); - - virtual void stop() { - stop_ = true; - serverTransport_->interrupt(); - } - - protected: - - boost::shared_ptr threadManager_; - - volatile bool stop_; - - volatile int64_t timeout_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ diff --git service/include/thrift/server/TThreadedServer.h service/include/thrift/server/TThreadedServer.h deleted file mode 100644 index 4d0811a..0000000 --- service/include/thrift/server/TThreadedServer.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_ -#define _THRIFT_SERVER_TTHREADEDSERVER_H_ 1 - -#include -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::TProcessor; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransportFactory; -using apache::thrift::concurrency::Monitor; -using apache::thrift::concurrency::ThreadFactory; - -class TThreadedServer : public TServer { - - public: - class Task; - - TThreadedServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory); - - TThreadedServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory, - boost::shared_ptr threadFactory); - - virtual ~TThreadedServer(); - - virtual void serve(); - - void stop() { - stop_ = true; - serverTransport_->interrupt(); - } - - protected: - boost::shared_ptr threadFactory_; - volatile bool stop_; - - Monitor tasksMonitor_; - std::set tasks_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_ diff --git service/include/thrift/transport/TBufferTransports.h service/include/thrift/transport/TBufferTransports.h deleted file mode 100644 index 1908205..0000000 --- service/include/thrift/transport/TBufferTransports.h +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ -#define _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ 1 - -#include -#include "boost/scoped_array.hpp" - -#include - -#ifdef __GNUC__ -#define TDB_LIKELY(val) (__builtin_expect((val), 1)) -#define TDB_UNLIKELY(val) (__builtin_expect((val), 0)) -#else -#define TDB_LIKELY(val) (val) -#define TDB_UNLIKELY(val) (val) -#endif - -namespace apache { namespace thrift { namespace transport { - - -/** - * Base class for all transports that use read/write buffers for performance. - * - * TBufferBase is designed to implement the fast-path "memcpy" style - * operations that work in the common case. It does so with small and - * (eventually) nonvirtual, inlinable methods. TBufferBase is an abstract - * class. Subclasses are expected to define the "slow path" operations - * that have to be done when the buffers are full or empty. - * - */ -class TBufferBase : public TTransport { - - public: - - /** - * Fast-path read. - * - * When we have enough data buffered to fulfill the read, we can satisfy it - * with a single memcpy, then adjust our internal pointers. If the buffer - * is empty, we call out to our slow path, implemented by a subclass. - * This method is meant to eventually be nonvirtual and inlinable. - */ - uint32_t read(uint8_t* buf, uint32_t len) { - uint8_t* new_rBase = rBase_ + len; - if (TDB_LIKELY(new_rBase <= rBound_)) { - std::memcpy(buf, rBase_, len); - rBase_ = new_rBase; - return len; - } - return readSlow(buf, len); - } - - /** - * Fast-path write. - * - * When we have enough empty space in our buffer to accomodate the write, we - * can satisfy it with a single memcpy, then adjust our internal pointers. - * If the buffer is full, we call out to our slow path, implemented by a - * subclass. This method is meant to eventually be nonvirtual and - * inlinable. - */ - void write(const uint8_t* buf, uint32_t len) { - uint8_t* new_wBase = wBase_ + len; - if (TDB_LIKELY(new_wBase <= wBound_)) { - std::memcpy(wBase_, buf, len); - wBase_ = new_wBase; - return; - } - writeSlow(buf, len); - } - - /** - * Fast-path borrow. A lot like the fast-path read. - */ - const uint8_t* borrow(uint8_t* buf, uint32_t* len) { - if (TDB_LIKELY(static_cast(*len) <= rBound_ - rBase_)) { - // With strict aliasing, writing to len shouldn't force us to - // refetch rBase_ from memory. TODO(dreiss): Verify this. - *len = rBound_ - rBase_; - return rBase_; - } - return borrowSlow(buf, len); - } - - /** - * Consume doesn't require a slow path. - */ - void consume(uint32_t len) { - if (TDB_LIKELY(static_cast(len) <= rBound_ - rBase_)) { - rBase_ += len; - } else { - throw TTransportException(TTransportException::BAD_ARGS, - "consume did not follow a borrow."); - } - } - - - protected: - - /// Slow path read. - virtual uint32_t readSlow(uint8_t* buf, uint32_t len) = 0; - - /// Slow path write. - virtual void writeSlow(const uint8_t* buf, uint32_t len) = 0; - - /** - * Slow path borrow. - * - * POSTCONDITION: return == NULL || rBound_ - rBase_ >= *len - */ - virtual const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len) = 0; - - /** - * Trivial constructor. - * - * Initialize pointers safely. Constructing is not a very - * performance-sensitive operation, so it is okay to just leave it to - * the concrete class to set up pointers correctly. - */ - TBufferBase() - : rBase_(NULL) - , rBound_(NULL) - , wBase_(NULL) - , wBound_(NULL) - {} - - /// Convenience mutator for setting the read buffer. - void setReadBuffer(uint8_t* buf, uint32_t len) { - rBase_ = buf; - rBound_ = buf+len; - } - - /// Convenience mutator for setting the write buffer. - void setWriteBuffer(uint8_t* buf, uint32_t len) { - wBase_ = buf; - wBound_ = buf+len; - } - - virtual ~TBufferBase() {} - - /// Reads begin here. - uint8_t* rBase_; - /// Reads may extend to just before here. - uint8_t* rBound_; - - /// Writes begin here. - uint8_t* wBase_; - /// Writes may extend to just before here. - uint8_t* wBound_; -}; - - -/** - * Base class for all transport which wraps transport to new one. - */ -class TUnderlyingTransport : public TBufferBase { - public: - static const int DEFAULT_BUFFER_SIZE = 512; - - virtual bool peek() { - return (rBase_ < rBound_) || transport_->peek(); - } - - void open() { - transport_->open(); - } - - bool isOpen() { - return transport_->isOpen(); - } - - void close() { - flush(); - transport_->close(); - } - - boost::shared_ptr getUnderlyingTransport() { - return transport_; - } - - protected: - boost::shared_ptr transport_; - - uint32_t rBufSize_; - uint32_t wBufSize_; - boost::scoped_array rBuf_; - boost::scoped_array wBuf_; - - TUnderlyingTransport(boost::shared_ptr transport, uint32_t sz) - : transport_(transport) - , rBufSize_(sz) - , wBufSize_(sz) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} - - TUnderlyingTransport(boost::shared_ptr transport) - : transport_(transport) - , rBufSize_(DEFAULT_BUFFER_SIZE) - , wBufSize_(DEFAULT_BUFFER_SIZE) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} - - TUnderlyingTransport(boost::shared_ptr transport, uint32_t rsz, uint32_t wsz) - : transport_(transport) - , rBufSize_(rsz) - , wBufSize_(wsz) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} -}; - -/** - * Buffered transport. For reads it will read more data than is requested - * and will serve future data out of a local buffer. For writes, data is - * stored to an in memory buffer before being written out. - * - */ -class TBufferedTransport : public TUnderlyingTransport { - public: - - /// Use default buffer sizes. - TBufferedTransport(boost::shared_ptr transport) - : TUnderlyingTransport(transport) - { - initPointers(); - } - - /// Use specified buffer sizes. - TBufferedTransport(boost::shared_ptr transport, uint32_t sz) - : TUnderlyingTransport(transport, sz) - { - initPointers(); - } - - /// Use specified read and write buffer sizes. - TBufferedTransport(boost::shared_ptr transport, uint32_t rsz, uint32_t wsz) - : TUnderlyingTransport(transport, rsz, wsz) - { - initPointers(); - } - - virtual bool peek() { - /* shigin: see THRIFT-96 discussion */ - if (rBase_ == rBound_) { - setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_)); - } - return (rBound_ > rBase_); - } - virtual uint32_t readSlow(uint8_t* buf, uint32_t len); - - virtual void writeSlow(const uint8_t* buf, uint32_t len); - - void flush(); - - - /** - * The following behavior is currently implemented by TBufferedTransport, - * but that may change in a future version: - * 1/ If len is at most rBufSize_, borrow will never return NULL. - * Depending on the underlying transport, it could throw an exception - * or hang forever. - * 2/ Some borrow requests may copy bytes internally. However, - * if len is at most rBufSize_/2, none of the copied bytes - * will ever have to be copied again. For optimial performance, - * stay under this limit. - */ - virtual const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - protected: - void initPointers() { - setReadBuffer(rBuf_.get(), 0); - setWriteBuffer(wBuf_.get(), wBufSize_); - // Write size never changes. - } -}; - - -/** - * Wraps a transport into a buffered one. - * - */ -class TBufferedTransportFactory : public TTransportFactory { - public: - TBufferedTransportFactory() {} - - virtual ~TBufferedTransportFactory() {} - - /** - * Wraps the transport into a buffered one. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return boost::shared_ptr(new TBufferedTransport(trans)); - } - -}; - - -/** - * Framed transport. All writes go into an in-memory buffer until flush is - * called, at which point the transport writes the length of the entire - * binary chunk followed by the data payload. This allows the receiver on the - * other end to always do fixed-length reads. - * - */ -class TFramedTransport : public TUnderlyingTransport { - public: - - /// Use default buffer sizes. - TFramedTransport(boost::shared_ptr transport) - : TUnderlyingTransport(transport) - { - initPointers(); - } - - TFramedTransport(boost::shared_ptr transport, uint32_t sz) - : TUnderlyingTransport(transport, sz) - { - initPointers(); - } - - virtual uint32_t readSlow(uint8_t* buf, uint32_t len); - - virtual void writeSlow(const uint8_t* buf, uint32_t len); - - virtual void flush(); - - const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - protected: - /** - * Reads a frame of input from the underlying stream. - */ - void readFrame(); - - void initPointers() { - setReadBuffer(NULL, 0); - setWriteBuffer(wBuf_.get(), wBufSize_); - - // Pad the buffer so we can insert the size later. - int32_t pad = 0; - this->write((uint8_t*)&pad, sizeof(pad)); - } -}; - -/** - * Wraps a transport into a framed one. - * - */ -class TFramedTransportFactory : public TTransportFactory { - public: - TFramedTransportFactory() {} - - virtual ~TFramedTransportFactory() {} - - /** - * Wraps the transport into a framed one. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return boost::shared_ptr(new TFramedTransport(trans)); - } - -}; - - -/** - * A memory buffer is a tranpsort that simply reads from and writes to an - * in memory buffer. Anytime you call write on it, the data is simply placed - * into a buffer, and anytime you call read, data is read from that buffer. - * - * The buffers are allocated using C constructs malloc,realloc, and the size - * doubles as necessary. We've considered using scoped - * - */ -class TMemoryBuffer : public TBufferBase { - private: - - // Common initialization done by all constructors. - void initCommon(uint8_t* buf, uint32_t size, bool owner, uint32_t wPos) { - if (buf == NULL && size != 0) { - assert(owner); - buf = (uint8_t*)std::malloc(size); - if (buf == NULL) { - throw TTransportException("Out of memory"); - } - } - - buffer_ = buf; - bufferSize_ = size; - - rBase_ = buffer_; - rBound_ = buffer_ + wPos; - // TODO(dreiss): Investigate NULL-ing this if !owner. - wBase_ = buffer_ + wPos; - wBound_ = buffer_ + bufferSize_; - - owner_ = owner; - - // rBound_ is really an artifact. In principle, it should always be - // equal to wBase_. We update it in a few places (computeRead, etc.). - } - - public: - static const uint32_t defaultSize = 1024; - - /** - * This enum specifies how a TMemoryBuffer should treat - * memory passed to it via constructors or resetBuffer. - * - * OBSERVE: - * TMemoryBuffer will simply store a pointer to the memory. - * It is the callers responsibility to ensure that the pointer - * remains valid for the lifetime of the TMemoryBuffer, - * and that it is properly cleaned up. - * Note that no data can be written to observed buffers. - * - * COPY: - * TMemoryBuffer will make an internal copy of the buffer. - * The caller has no responsibilities. - * - * TAKE_OWNERSHIP: - * TMemoryBuffer will become the "owner" of the buffer, - * and will be responsible for freeing it. - * The membory must have been allocated with malloc. - */ - enum MemoryPolicy - { OBSERVE = 1 - , COPY = 2 - , TAKE_OWNERSHIP = 3 - }; - - /** - * Construct a TMemoryBuffer with a default-sized buffer, - * owned by the TMemoryBuffer object. - */ - TMemoryBuffer() { - initCommon(NULL, defaultSize, true, 0); - } - - /** - * Construct a TMemoryBuffer with a buffer of a specified size, - * owned by the TMemoryBuffer object. - * - * @param sz The initial size of the buffer. - */ - TMemoryBuffer(uint32_t sz) { - initCommon(NULL, sz, true, 0); - } - - /** - * Construct a TMemoryBuffer with buf as its initial contents. - * - * @param buf The initial contents of the buffer. - * Note that, while buf is a non-const pointer, - * TMemoryBuffer will not write to it if policy == OBSERVE, - * so it is safe to const_cast(whatever). - * @param sz The size of @c buf. - * @param policy See @link MemoryPolicy @endlink . - */ - TMemoryBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE) { - if (buf == NULL && sz != 0) { - throw TTransportException(TTransportException::BAD_ARGS, - "TMemoryBuffer given null buffer with non-zero size."); - } - - switch (policy) { - case OBSERVE: - case TAKE_OWNERSHIP: - initCommon(buf, sz, policy == TAKE_OWNERSHIP, sz); - break; - case COPY: - initCommon(NULL, sz, true, 0); - this->write(buf, sz); - break; - default: - throw TTransportException(TTransportException::BAD_ARGS, - "Invalid MemoryPolicy for TMemoryBuffer"); - } - } - - ~TMemoryBuffer() { - if (owner_) { - std::free(buffer_); - } - } - - bool isOpen() { - return true; - } - - bool peek() { - return (rBase_ < wBase_); - } - - void open() {} - - void close() {} - - // TODO(dreiss): Make bufPtr const. - void getBuffer(uint8_t** bufPtr, uint32_t* sz) { - *bufPtr = rBase_; - *sz = wBase_ - rBase_; - } - - std::string getBufferAsString() { - if (buffer_ == NULL) { - return ""; - } - uint8_t* buf; - uint32_t sz; - getBuffer(&buf, &sz); - return std::string((char*)buf, (std::string::size_type)sz); - } - - void appendBufferToString(std::string& str) { - if (buffer_ == NULL) { - return; - } - uint8_t* buf; - uint32_t sz; - getBuffer(&buf, &sz); - str.append((char*)buf, sz); - } - - void resetBuffer(bool reset_capacity = false) { - if (reset_capacity) - { - assert(owner_); - - void* new_buffer = std::realloc(buffer_, defaultSize); - - if (new_buffer == NULL) { - throw TTransportException("Out of memory."); - } - - buffer_ = (uint8_t*) new_buffer; - bufferSize_ = defaultSize; - - wBound_ = buffer_ + bufferSize_; - } - - rBase_ = buffer_; - rBound_ = buffer_; - wBase_ = buffer_; - // It isn't safe to write into a buffer we don't own. - if (!owner_) { - wBound_ = wBase_; - bufferSize_ = 0; - } - } - - /// See constructor documentation. - void resetBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE) { - // Use a variant of the copy-and-swap trick for assignment operators. - // This is sub-optimal in terms of performance for two reasons: - // 1/ The constructing and swapping of the (small) values - // in the temporary object takes some time, and is not necessary. - // 2/ If policy == COPY, we allocate the new buffer before - // freeing the old one, precluding the possibility of - // reusing that memory. - // I doubt that either of these problems could be optimized away, - // but the second is probably no a common case, and the first is minor. - // I don't expect resetBuffer to be a common operation, so I'm willing to - // bite the performance bullet to make the method this simple. - - // Construct the new buffer. - TMemoryBuffer new_buffer(buf, sz, policy); - // Move it into ourself. - this->swap(new_buffer); - // Our old self gets destroyed. - } - - std::string readAsString(uint32_t len) { - std::string str; - (void)readAppendToString(str, len); - return str; - } - - uint32_t readAppendToString(std::string& str, uint32_t len); - - void readEnd() { - if (rBase_ == wBase_) { - resetBuffer(); - } - } - - uint32_t available_read() const { - // Remember, wBase_ is the real rBound_. - return wBase_ - rBase_; - } - - uint32_t available_write() const { - return wBound_ - wBase_; - } - - // Returns a pointer to where the client can write data to append to - // the TMemoryBuffer, and ensures the buffer is big enough to accomodate a - // write of the provided length. The returned pointer is very convenient for - // passing to read(), recv(), or similar. You must call wroteBytes() as soon - // as data is written or the buffer will not be aware that data has changed. - uint8_t* getWritePtr(uint32_t len) { - ensureCanWrite(len); - return wBase_; - } - - // Informs the buffer that the client has written 'len' bytes into storage - // that had been provided by getWritePtr(). - void wroteBytes(uint32_t len); - - protected: - void swap(TMemoryBuffer& that) { - using std::swap; - swap(buffer_, that.buffer_); - swap(bufferSize_, that.bufferSize_); - - swap(rBase_, that.rBase_); - swap(rBound_, that.rBound_); - swap(wBase_, that.wBase_); - swap(wBound_, that.wBound_); - - swap(owner_, that.owner_); - } - - // Make sure there's at least 'len' bytes available for writing. - void ensureCanWrite(uint32_t len); - - // Compute the position and available data for reading. - void computeRead(uint32_t len, uint8_t** out_start, uint32_t* out_give); - - uint32_t readSlow(uint8_t* buf, uint32_t len); - - void writeSlow(const uint8_t* buf, uint32_t len); - - const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - // Data buffer - uint8_t* buffer_; - - // Allocated buffer size - uint32_t bufferSize_; - - // Is this object the owner of the buffer? - bool owner_; - - // Don't forget to update constrctors, initCommon, and swap if - // you add new members. -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ diff --git service/include/thrift/transport/TFDTransport.h service/include/thrift/transport/TFDTransport.h deleted file mode 100644 index bda5d82..0000000 --- service/include/thrift/transport/TFDTransport.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TFDTRANSPORT_H_ 1 - -#include -#include - -#include "TTransport.h" -#include "TServerSocket.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * Dead-simple wrapper around a file descriptor. - * - */ -class TFDTransport : public TTransport { - public: - enum ClosePolicy - { NO_CLOSE_ON_DESTROY = 0 - , CLOSE_ON_DESTROY = 1 - }; - - TFDTransport(int fd, ClosePolicy close_policy = NO_CLOSE_ON_DESTROY) - : fd_(fd) - , close_policy_(close_policy) - {} - - ~TFDTransport() { - if (close_policy_ == CLOSE_ON_DESTROY) { - close(); - } - } - - bool isOpen() { return fd_ >= 0; } - - void open() {} - - void close(); - - uint32_t read(uint8_t* buf, uint32_t len); - - void write(const uint8_t* buf, uint32_t len); - - void setFD(int fd) { fd_ = fd; } - int getFD() { return fd_; } - - protected: - int fd_; - ClosePolicy close_policy_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_ diff --git service/include/thrift/transport/TFileTransport.h service/include/thrift/transport/TFileTransport.h deleted file mode 100644 index b08c5c8..0000000 --- service/include/thrift/transport/TFileTransport.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TFILETRANSPORT_H_ -#define _THRIFT_TRANSPORT_TFILETRANSPORT_H_ 1 - -#include "TTransport.h" -#include "Thrift.h" -#include "TProcessor.h" - -#include -#include - -#include - -#include - -namespace apache { namespace thrift { namespace transport { - -using apache::thrift::TProcessor; -using apache::thrift::protocol::TProtocolFactory; - -// Data pertaining to a single event -typedef struct eventInfo { - uint8_t* eventBuff_; - uint32_t eventSize_; - uint32_t eventBuffPos_; - - eventInfo():eventBuff_(NULL), eventSize_(0), eventBuffPos_(0){}; - ~eventInfo() { - if (eventBuff_) { - delete[] eventBuff_; - } - } -} eventInfo; - -// information about current read state -typedef struct readState { - eventInfo* event_; - - // keep track of event size - uint8_t eventSizeBuff_[4]; - uint8_t eventSizeBuffPos_; - bool readingSize_; - - // read buffer variables - int32_t bufferPtr_; - int32_t bufferLen_; - - // last successful dispatch point - int32_t lastDispatchPtr_; - - void resetState(uint32_t lastDispatchPtr) { - readingSize_ = true; - eventSizeBuffPos_ = 0; - lastDispatchPtr_ = lastDispatchPtr; - } - - void resetAllValues() { - resetState(0); - bufferPtr_ = 0; - bufferLen_ = 0; - if (event_) { - delete(event_); - } - event_ = 0; - } - - readState() { - event_ = 0; - resetAllValues(); - } - - ~readState() { - if (event_) { - delete(event_); - } - } - -} readState; - -/** - * TFileTransportBuffer - buffer class used by TFileTransport for queueing up events - * to be written to disk. Should be used in the following way: - * 1) Buffer created - * 2) Buffer written to (addEvent) - * 3) Buffer read from (getNext) - * 4) Buffer reset (reset) - * 5) Go back to 2, or destroy buffer - * - * The buffer should never be written to after it is read from, unless it is reset first. - * Note: The above rules are enforced mainly for debugging its sole client TFileTransport - * which uses the buffer in this way. - * - */ -class TFileTransportBuffer { - public: - TFileTransportBuffer(uint32_t size); - ~TFileTransportBuffer(); - - bool addEvent(eventInfo *event); - eventInfo* getNext(); - void reset(); - bool isFull(); - bool isEmpty(); - - private: - TFileTransportBuffer(); // should not be used - - enum mode { - WRITE, - READ - }; - mode bufferMode_; - - uint32_t writePoint_; - uint32_t readPoint_; - uint32_t size_; - eventInfo** buffer_; -}; - -/** - * Abstract interface for transports used to read files - */ -class TFileReaderTransport : virtual public TTransport { - public: - virtual int32_t getReadTimeout() = 0; - virtual void setReadTimeout(int32_t readTimeout) = 0; - - virtual uint32_t getNumChunks() = 0; - virtual uint32_t getCurChunk() = 0; - virtual void seekToChunk(int32_t chunk) = 0; - virtual void seekToEnd() = 0; -}; - -/** - * Abstract interface for transports used to write files - */ -class TFileWriterTransport : virtual public TTransport { - public: - virtual uint32_t getChunkSize() = 0; - virtual void setChunkSize(uint32_t chunkSize) = 0; -}; - -/** - * File implementation of a transport. Reads and writes are done to a - * file on disk. - * - */ -class TFileTransport : public TFileReaderTransport, - public TFileWriterTransport { - public: - TFileTransport(std::string path, bool readOnly=false); - ~TFileTransport(); - - // TODO: what is the correct behaviour for this? - // the log file is generally always open - bool isOpen() { - return true; - } - - void write(const uint8_t* buf, uint32_t len); - void flush(); - - uint32_t readAll(uint8_t* buf, uint32_t len); - uint32_t read(uint8_t* buf, uint32_t len); - - // log-file specific functions - void seekToChunk(int32_t chunk); - void seekToEnd(); - uint32_t getNumChunks(); - uint32_t getCurChunk(); - - // for changing the output file - void resetOutputFile(int fd, std::string filename, int64_t offset); - - // Setter/Getter functions for user-controllable options - void setReadBuffSize(uint32_t readBuffSize) { - if (readBuffSize) { - readBuffSize_ = readBuffSize; - } - } - uint32_t getReadBuffSize() { - return readBuffSize_; - } - - static const int32_t TAIL_READ_TIMEOUT = -1; - static const int32_t NO_TAIL_READ_TIMEOUT = 0; - void setReadTimeout(int32_t readTimeout) { - readTimeout_ = readTimeout; - } - int32_t getReadTimeout() { - return readTimeout_; - } - - void setChunkSize(uint32_t chunkSize) { - if (chunkSize) { - chunkSize_ = chunkSize; - } - } - uint32_t getChunkSize() { - return chunkSize_; - } - - void setEventBufferSize(uint32_t bufferSize) { - if (bufferAndThreadInitialized_) { - GlobalOutput("Cannot change the buffer size after writer thread started"); - return; - } - eventBufferSize_ = bufferSize; - } - - uint32_t getEventBufferSize() { - return eventBufferSize_; - } - - void setFlushMaxUs(uint32_t flushMaxUs) { - if (flushMaxUs) { - flushMaxUs_ = flushMaxUs; - } - } - uint32_t getFlushMaxUs() { - return flushMaxUs_; - } - - void setFlushMaxBytes(uint32_t flushMaxBytes) { - if (flushMaxBytes) { - flushMaxBytes_ = flushMaxBytes; - } - } - uint32_t getFlushMaxBytes() { - return flushMaxBytes_; - } - - void setMaxEventSize(uint32_t maxEventSize) { - maxEventSize_ = maxEventSize; - } - uint32_t getMaxEventSize() { - return maxEventSize_; - } - - void setMaxCorruptedEvents(uint32_t maxCorruptedEvents) { - maxCorruptedEvents_ = maxCorruptedEvents; - } - uint32_t getMaxCorruptedEvents() { - return maxCorruptedEvents_; - } - - void setEofSleepTimeUs(uint32_t eofSleepTime) { - if (eofSleepTime) { - eofSleepTime_ = eofSleepTime; - } - } - uint32_t getEofSleepTimeUs() { - return eofSleepTime_; - } - - private: - // helper functions for writing to a file - void enqueueEvent(const uint8_t* buf, uint32_t eventLen, bool blockUntilFlush); - bool swapEventBuffers(struct timespec* deadline); - bool initBufferAndWriteThread(); - - // control for writer thread - static void* startWriterThread(void* ptr) { - (((TFileTransport*)ptr)->writerThread()); - return 0; - } - void writerThread(); - - // helper functions for reading from a file - eventInfo* readEvent(); - - // event corruption-related functions - bool isEventCorrupted(); - void performRecovery(); - - // Utility functions - void openLogFile(); - void getNextFlushTime(struct timespec* ts_next_flush); - - // Class variables - readState readState_; - uint8_t* readBuff_; - eventInfo* currentEvent_; - - uint32_t readBuffSize_; - static const uint32_t DEFAULT_READ_BUFF_SIZE = 1 * 1024 * 1024; - - int32_t readTimeout_; - static const int32_t DEFAULT_READ_TIMEOUT_MS = 200; - - // size of chunks that file will be split up into - uint32_t chunkSize_; - static const uint32_t DEFAULT_CHUNK_SIZE = 16 * 1024 * 1024; - - // size of event buffers - uint32_t eventBufferSize_; - static const uint32_t DEFAULT_EVENT_BUFFER_SIZE = 10000; - - // max number of microseconds that can pass without flushing - uint32_t flushMaxUs_; - static const uint32_t DEFAULT_FLUSH_MAX_US = 3000000; - - // max number of bytes that can be written without flushing - uint32_t flushMaxBytes_; - static const uint32_t DEFAULT_FLUSH_MAX_BYTES = 1000 * 1024; - - // max event size - uint32_t maxEventSize_; - static const uint32_t DEFAULT_MAX_EVENT_SIZE = 0; - - // max number of corrupted events per chunk - uint32_t maxCorruptedEvents_; - static const uint32_t DEFAULT_MAX_CORRUPTED_EVENTS = 0; - - // sleep duration when EOF is hit - uint32_t eofSleepTime_; - static const uint32_t DEFAULT_EOF_SLEEP_TIME_US = 500 * 1000; - - // sleep duration when a corrupted event is encountered - uint32_t corruptedEventSleepTime_; - static const uint32_t DEFAULT_CORRUPTED_SLEEP_TIME_US = 1 * 1000 * 1000; - - // writer thread id - pthread_t writerThreadId_; - - // buffers to hold data before it is flushed. Each element of the buffer stores a msg that - // needs to be written to the file. The buffers are swapped by the writer thread. - TFileTransportBuffer *dequeueBuffer_; - TFileTransportBuffer *enqueueBuffer_; - - // conditions used to block when the buffer is full or empty - pthread_cond_t notFull_, notEmpty_; - volatile bool closing_; - - // To keep track of whether the buffer has been flushed - pthread_cond_t flushed_; - volatile bool forceFlush_; - - // Mutex that is grabbed when enqueueing and swapping the read/write buffers - pthread_mutex_t mutex_; - - // File information - std::string filename_; - int fd_; - - // Whether the writer thread and buffers have been initialized - bool bufferAndThreadInitialized_; - - // Offset within the file - off_t offset_; - - // event corruption information - uint32_t lastBadChunk_; - uint32_t numCorruptedEventsInChunk_; - - bool readOnly_; -}; - -// Exception thrown when EOF is hit -class TEOFException : public TTransportException { - public: - TEOFException(): - TTransportException(TTransportException::END_OF_FILE) {}; -}; - - -// wrapper class to process events from a file containing thrift events -class TFileProcessor { - public: - /** - * Constructor that defaults output transport to null transport - * - * @param processor processes log-file events - * @param protocolFactory protocol factory - * @param inputTransport file transport - */ - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - boost::shared_ptr inputTransport); - - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - boost::shared_ptr inputTransport); - - /** - * Constructor - * - * @param processor processes log-file events - * @param protocolFactory protocol factory - * @param inputTransport input file transport - * @param output output transport - */ - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - boost::shared_ptr inputTransport, - boost::shared_ptr outputTransport); - - /** - * processes events from the file - * - * @param numEvents number of events to process (0 for unlimited) - * @param tail tails the file if true - */ - void process(uint32_t numEvents, bool tail); - - /** - * process events until the end of the chunk - * - */ - void processChunk(); - - private: - boost::shared_ptr processor_; - boost::shared_ptr inputProtocolFactory_; - boost::shared_ptr outputProtocolFactory_; - boost::shared_ptr inputTransport_; - boost::shared_ptr outputTransport_; -}; - - -}}} // apache::thrift::transport - -#endif // _THRIFT_TRANSPORT_TFILETRANSPORT_H_ diff --git service/include/thrift/transport/THttpClient.h service/include/thrift/transport/THttpClient.h deleted file mode 100644 index f4be4c1..0000000 --- service/include/thrift/transport/THttpClient.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ -#define _THRIFT_TRANSPORT_THTTPCLIENT_H_ 1 - -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * HTTP client implementation of the thrift transport. This was irritating - * to write, but the alternatives in C++ land are daunting. Linking CURL - * requires 23 dynamic libraries last time I checked (WTF?!?). All we have - * here is a VERY basic HTTP/1.1 client which supports HTTP 100 Continue, - * chunked transfer encoding, keepalive, etc. Tested against Apache. - * - */ -class THttpClient : public TTransport { - public: - THttpClient(boost::shared_ptr transport, std::string host, std::string path=""); - - THttpClient(std::string host, int port, std::string path=""); - - virtual ~THttpClient(); - - void open() { - transport_->open(); - } - - bool isOpen() { - return transport_->isOpen(); - } - - bool peek() { - return transport_->peek(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void readEnd(); - - void write(const uint8_t* buf, uint32_t len); - - void flush(); - - private: - void init(); - - protected: - - boost::shared_ptr transport_; - - TMemoryBuffer writeBuffer_; - TMemoryBuffer readBuffer_; - - std::string host_; - std::string path_; - - bool readHeaders_; - bool chunked_; - bool chunkedDone_; - uint32_t chunkSize_; - uint32_t contentLength_; - - char* httpBuf_; - uint32_t httpPos_; - uint32_t httpBufLen_; - uint32_t httpBufSize_; - - uint32_t readMoreData(); - char* readLine(); - - void readHeaders(); - void parseHeader(char* header); - bool parseStatusLine(char* status); - - uint32_t readChunked(); - void readChunkedFooters(); - uint32_t parseChunkSize(char* line); - - uint32_t readContent(uint32_t size); - - void refill(); - void shift(); - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ diff --git service/include/thrift/transport/TServerSocket.h service/include/thrift/transport/TServerSocket.h deleted file mode 100644 index a6be017..0000000 --- service/include/thrift/transport/TServerSocket.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_ -#define _THRIFT_TRANSPORT_TSERVERSOCKET_H_ 1 - -#include "TServerTransport.h" -#include - -namespace apache { namespace thrift { namespace transport { - -class TSocket; - -/** - * Server socket implementation of TServerTransport. Wrapper around a unix - * socket listen and accept calls. - * - */ -class TServerSocket : public TServerTransport { - public: - TServerSocket(int port); - TServerSocket(int port, int sendTimeout, int recvTimeout); - - ~TServerSocket(); - - void setSendTimeout(int sendTimeout); - void setRecvTimeout(int recvTimeout); - - void setRetryLimit(int retryLimit); - void setRetryDelay(int retryDelay); - - void setTcpSendBuffer(int tcpSendBuffer); - void setTcpRecvBuffer(int tcpRecvBuffer); - - void listen(); - void close(); - - void interrupt(); - - protected: - boost::shared_ptr acceptImpl(); - - private: - int port_; - int serverSocket_; - int acceptBacklog_; - int sendTimeout_; - int recvTimeout_; - int retryLimit_; - int retryDelay_; - int tcpSendBuffer_; - int tcpRecvBuffer_; - - int intSock1_; - int intSock2_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_ diff --git service/include/thrift/transport/TServerTransport.h service/include/thrift/transport/TServerTransport.h deleted file mode 100644 index 40bbc6c..0000000 --- service/include/thrift/transport/TServerTransport.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ 1 - -#include "TTransport.h" -#include "TTransportException.h" -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Server transport framework. A server needs to have some facility for - * creating base transports to read/write from. - * - */ -class TServerTransport { - public: - virtual ~TServerTransport() {} - - /** - * Starts the server transport listening for new connections. Prior to this - * call most transports will not return anything when accept is called. - * - * @throws TTransportException if we were unable to listen - */ - virtual void listen() {} - - /** - * Gets a new dynamically allocated transport object and passes it to the - * caller. Note that it is the explicit duty of the caller to free the - * allocated object. The returned TTransport object must always be in the - * opened state. NULL should never be returned, instead an Exception should - * always be thrown. - * - * @return A new TTransport object - * @throws TTransportException if there is an error - */ - boost::shared_ptr accept() { - boost::shared_ptr result = acceptImpl(); - if (result == NULL) { - throw TTransportException("accept() may not return NULL"); - } - return result; - } - - /** - * For "smart" TServerTransport implementations that work in a multi - * threaded context this can be used to break out of an accept() call. - * It is expected that the transport will throw a TTransportException - * with the interrupted error code. - */ - virtual void interrupt() {} - - /** - * Closes this transport such that future calls to accept will do nothing. - */ - virtual void close() = 0; - - protected: - TServerTransport() {} - - /** - * Subclasses should implement this function for accept. - * - * @return A newly allocated TTransport object - * @throw TTransportException If an error occurs - */ - virtual boost::shared_ptr acceptImpl() = 0; - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ diff --git service/include/thrift/transport/TShortReadTransport.h service/include/thrift/transport/TShortReadTransport.h deleted file mode 100644 index 3df8a57..0000000 --- service/include/thrift/transport/TShortReadTransport.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ 1 - -#include - -#include - -namespace apache { namespace thrift { namespace transport { namespace test { - -/** - * This class is only meant for testing. It wraps another transport. - * Calls to read are passed through with some probability. Otherwise, - * the read amount is randomly reduced before being passed through. - * - */ -class TShortReadTransport : public TTransport { - public: - TShortReadTransport(boost::shared_ptr transport, double full_prob) - : transport_(transport) - , fullProb_(full_prob) - {} - - bool isOpen() { - return transport_->isOpen(); - } - - bool peek() { - return transport_->peek(); - } - - void open() { - transport_->open(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len) { - if (len == 0) { - return 0; - } - - if (rand()/(double)RAND_MAX >= fullProb_) { - len = 1 + rand()%len; - } - return transport_->read(buf, len); - } - - void write(const uint8_t* buf, uint32_t len) { - transport_->write(buf, len); - } - - void flush() { - transport_->flush(); - } - - const uint8_t* borrow(uint8_t* buf, uint32_t* len) { - return transport_->borrow(buf, len); - } - - void consume(uint32_t len) { - return transport_->consume(len); - } - - boost::shared_ptr getUnderlyingTransport() { - return transport_; - } - - protected: - boost::shared_ptr transport_; - double fullProb_; -}; - -}}}} // apache::thrift::transport::test - -#endif // #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ diff --git service/include/thrift/transport/TSimpleFileTransport.h service/include/thrift/transport/TSimpleFileTransport.h deleted file mode 100644 index 6cc52ea..0000000 --- service/include/thrift/transport/TSimpleFileTransport.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ 1 - -#include "TFDTransport.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * Dead-simple wrapper around a file. - * - * Writeable files are opened with O_CREAT and O_APPEND - */ -class TSimpleFileTransport : public TFDTransport { - public: - TSimpleFileTransport(const std::string& path, - bool read = true, - bool write = false); -}; - -}}} // apache::thrift::transport - -#endif // _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ diff --git service/include/thrift/transport/TSocket.h service/include/thrift/transport/TSocket.h deleted file mode 100644 index b0f445a..0000000 --- service/include/thrift/transport/TSocket.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSOCKET_H_ -#define _THRIFT_TRANSPORT_TSOCKET_H_ 1 - -#include -#include - -#include "TTransport.h" -#include "TServerSocket.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * TCP Socket implementation of the TTransport interface. - * - */ -class TSocket : public TTransport { - /** - * We allow the TServerSocket acceptImpl() method to access the private - * members of a socket so that it can access the TSocket(int socket) - * constructor which creates a socket object from the raw UNIX socket - * handle. - */ - friend class TServerSocket; - - public: - /** - * Constructs a new socket. Note that this does NOT actually connect the - * socket. - * - */ - TSocket(); - - /** - * Constructs a new socket. Note that this does NOT actually connect the - * socket. - * - * @param host An IP address or hostname to connect to - * @param port The port to connect on - */ - TSocket(std::string host, int port); - - /** - * Destroyes the socket object, closing it if necessary. - */ - virtual ~TSocket(); - - /** - * Whether the socket is alive. - * - * @return Is the socket alive? - */ - bool isOpen(); - - /** - * Calls select on the socket to see if there is more data available. - */ - bool peek(); - - /** - * Creates and opens the UNIX socket. - * - * @throws TTransportException If the socket could not connect - */ - virtual void open(); - - /** - * Shuts down communications on the socket. - */ - void close(); - - /** - * Reads from the underlying socket. - */ - uint32_t read(uint8_t* buf, uint32_t len); - - /** - * Writes to the underlying socket. - */ - void write(const uint8_t* buf, uint32_t len); - - /** - * Get the host that the socket is connected to - * - * @return string host identifier - */ - std::string getHost(); - - /** - * Get the port that the socket is connected to - * - * @return int port number - */ - int getPort(); - - /** - * Set the host that socket will connect to - * - * @param host host identifier - */ - void setHost(std::string host); - - /** - * Set the port that socket will connect to - * - * @param port port number - */ - void setPort(int port); - - /** - * Controls whether the linger option is set on the socket. - * - * @param on Whether SO_LINGER is on - * @param linger If linger is active, the number of seconds to linger for - */ - void setLinger(bool on, int linger); - - /** - * Whether to enable/disable Nagle's algorithm. - * - * @param noDelay Whether or not to disable the algorithm. - * @return - */ - void setNoDelay(bool noDelay); - - /** - * Set the connect timeout - */ - void setConnTimeout(int ms); - - /** - * Set the receive timeout - */ - void setRecvTimeout(int ms); - - /** - * Set the send timeout - */ - void setSendTimeout(int ms); - - /** - * Set the max number of recv retries in case of an EAGAIN - * error - */ - void setMaxRecvRetries(int maxRecvRetries); - - /** - * Get socket information formated as a string - */ - std::string getSocketInfo(); - - /** - * Returns the DNS name of the host to which the socket is connected - */ - std::string getPeerHost(); - - /** - * Returns the address of the host to which the socket is connected - */ - std::string getPeerAddress(); - - /** - * Returns the port of the host to which the socket is connected - **/ - int getPeerPort(); - - - protected: - /** - * Constructor to create socket from raw UNIX handle. Never called directly - * but used by the TServerSocket class. - */ - TSocket(int socket); - - /** connect, called by open */ - void openConnection(struct addrinfo *res); - - /** Host to connect to */ - std::string host_; - - /** Peer hostname */ - std::string peerHost_; - - /** Peer address */ - std::string peerAddress_; - - /** Peer port */ - int peerPort_; - - /** Port number to connect on */ - int port_; - - /** Underlying UNIX socket handle */ - int socket_; - - /** Connect timeout in ms */ - int connTimeout_; - - /** Send timeout in ms */ - int sendTimeout_; - - /** Recv timeout in ms */ - int recvTimeout_; - - /** Linger on */ - bool lingerOn_; - - /** Linger val */ - int lingerVal_; - - /** Nodelay */ - bool noDelay_; - - /** Recv EGAIN retries */ - int maxRecvRetries_; - - /** Recv timeout timeval */ - struct timeval recvTimeval_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSOCKET_H_ - diff --git service/include/thrift/transport/TSocketPool.h service/include/thrift/transport/TSocketPool.h deleted file mode 100644 index 8c50669..0000000 --- service/include/thrift/transport/TSocketPool.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_ -#define _THRIFT_TRANSPORT_TSOCKETPOOL_H_ 1 - -#include -#include "TSocket.h" - -namespace apache { namespace thrift { namespace transport { - - /** - * Class to hold server information for TSocketPool - * - */ -class TSocketPoolServer { - - public: - /** - * Default constructor for server info - */ - TSocketPoolServer(); - - /** - * Constructor for TSocketPool server - */ - TSocketPoolServer(const std::string &host, int port); - - // Host name - std::string host_; - - // Port to connect on - int port_; - - // Socket for the server - int socket_; - - // Last time connecting to this server failed - int lastFailTime_; - - // Number of consecutive times connecting to this server failed - int consecutiveFailures_; -}; - -/** - * TCP Socket implementation of the TTransport interface. - * - */ -class TSocketPool : public TSocket { - - public: - - /** - * Socket pool constructor - */ - TSocketPool(); - - /** - * Socket pool constructor - * - * @param hosts list of host names - * @param ports list of port names - */ - TSocketPool(const std::vector &hosts, - const std::vector &ports); - - /** - * Socket pool constructor - * - * @param servers list of pairs of host name and port - */ - TSocketPool(const std::vector >& servers); - - /** - * Socket pool constructor - * - * @param servers list of TSocketPoolServers - */ - TSocketPool(const std::vector< boost::shared_ptr >& servers); - - /** - * Socket pool constructor - * - * @param host single host - * @param port single port - */ - TSocketPool(const std::string& host, int port); - - /** - * Destroyes the socket object, closing it if necessary. - */ - virtual ~TSocketPool(); - - /** - * Add a server to the pool - */ - void addServer(const std::string& host, int port); - - /** - * Set list of servers in this pool - */ - void setServers(const std::vector< boost::shared_ptr >& servers); - - /** - * Get list of servers in this pool - */ - void getServers(std::vector< boost::shared_ptr >& servers); - - /** - * Sets how many times to keep retrying a host in the connect function. - */ - void setNumRetries(int numRetries); - - /** - * Sets how long to wait until retrying a host if it was marked down - */ - void setRetryInterval(int retryInterval); - - /** - * Sets how many times to keep retrying a host before marking it as down. - */ - void setMaxConsecutiveFailures(int maxConsecutiveFailures); - - /** - * Turns randomization in connect order on or off. - */ - void setRandomize(bool randomize); - - /** - * Whether to always try the last server. - */ - void setAlwaysTryLast(bool alwaysTryLast); - - /** - * Creates and opens the UNIX socket. - */ - void open(); - - /* - * Closes the UNIX socket - */ - void close(); - - protected: - - void setCurrentServer(const boost::shared_ptr &server); - - /** List of servers to connect to */ - std::vector< boost::shared_ptr > servers_; - - /** Current server */ - boost::shared_ptr currentServer_; - - /** How many times to retry each host in connect */ - int numRetries_; - - /** Retry interval in seconds, how long to not try a host if it has been - * marked as down. - */ - int retryInterval_; - - /** Max consecutive failures before marking a host down. */ - int maxConsecutiveFailures_; - - /** Try hosts in order? or Randomized? */ - bool randomize_; - - /** Always try last host, even if marked down? */ - bool alwaysTryLast_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_ - diff --git service/include/thrift/transport/TTransport.h service/include/thrift/transport/TTransport.h deleted file mode 100644 index eb0d5df..0000000 --- service/include/thrift/transport/TTransport.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TTRANSPORT_H_ 1 - -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Generic interface for a method of transporting data. A TTransport may be - * capable of either reading or writing, but not necessarily both. - * - */ -class TTransport { - public: - /** - * Virtual deconstructor. - */ - virtual ~TTransport() {} - - /** - * Whether this transport is open. - */ - virtual bool isOpen() { - return false; - } - - /** - * Tests whether there is more data to read or if the remote side is - * still open. By default this is true whenever the transport is open, - * but implementations should add logic to test for this condition where - * possible (i.e. on a socket). - * This is used by a server to check if it should listen for another - * request. - */ - virtual bool peek() { - return isOpen(); - } - - /** - * Opens the transport for communications. - * - * @return bool Whether the transport was successfully opened - * @throws TTransportException if opening failed - */ - virtual void open() { - throw TTransportException(TTransportException::NOT_OPEN, "Cannot open base TTransport."); - } - - /** - * Closes the transport. - */ - virtual void close() { - throw TTransportException(TTransportException::NOT_OPEN, "Cannot close base TTransport."); - } - - /** - * Attempt to read up to the specified number of bytes into the string. - * - * @param buf Reference to the location to write the data - * @param len How many bytes to read - * @return How many bytes were actually read - * @throws TTransportException If an error occurs - */ - virtual uint32_t read(uint8_t* /* buf */, uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot read."); - } - - /** - * Reads the given amount of data in its entirety no matter what. - * - * @param s Reference to location for read data - * @param len How many bytes to read - * @return How many bytes read, which must be equal to size - * @throws TTransportException If insufficient data was read - */ - virtual uint32_t readAll(uint8_t* buf, uint32_t len) { - uint32_t have = 0; - uint32_t get = 0; - - while (have < len) { - get = read(buf+have, len-have); - if (get <= 0) { - throw TTransportException("No more data to read."); - } - have += get; - } - - return have; - } - - /** - * Called when read is completed. - * This can be over-ridden to perform a transport-specific action - * e.g. logging the request to a file - * - */ - virtual void readEnd() { - // default behaviour is to do nothing - return; - } - - /** - * Writes the string in its entirety to the buffer. - * - * @param buf The data to write out - * @throws TTransportException if an error occurs - */ - virtual void write(const uint8_t* /* buf */, uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot write."); - } - - /** - * Called when write is completed. - * This can be over-ridden to perform a transport-specific action - * at the end of a request. - * - */ - virtual void writeEnd() { - // default behaviour is to do nothing - return; - } - - /** - * Flushes any pending data to be written. Typically used with buffered - * transport mechanisms. - * - * @throws TTransportException if an error occurs - */ - virtual void flush() {} - - /** - * Attempts to return a pointer to \c len bytes, possibly copied into \c buf. - * Does not consume the bytes read (i.e.: a later read will return the same - * data). This method is meant to support protocols that need to read - * variable-length fields. They can attempt to borrow the maximum amount of - * data that they will need, then consume (see next method) what they - * actually use. Some transports will not support this method and others - * will fail occasionally, so protocols must be prepared to use read if - * borrow fails. - * - * @oaram buf A buffer where the data can be stored if needed. - * If borrow doesn't return buf, then the contents of - * buf after the call are undefined. - * @param len *len should initially contain the number of bytes to borrow. - * If borrow succeeds, *len will contain the number of bytes - * available in the returned pointer. This will be at least - * what was requested, but may be more if borrow returns - * a pointer to an internal buffer, rather than buf. - * If borrow fails, the contents of *len are undefined. - * @return If the borrow succeeds, return a pointer to the borrowed data. - * This might be equal to \c buf, or it might be a pointer into - * the transport's internal buffers. - * @throws TTransportException if an error occurs - */ - virtual const uint8_t* borrow(uint8_t* /* buf */, uint32_t* /* len */) { - return NULL; - } - - /** - * Remove len bytes from the transport. This should always follow a borrow - * of at least len bytes, and should always succeed. - * TODO(dreiss): Is there any transport that could borrow but fail to - * consume, or that would require a buffer to dump the consumed data? - * - * @param len How many bytes to consume - * @throws TTransportException If an error occurs - */ - virtual void consume(uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot consume."); - } - - protected: - /** - * Simple constructor. - */ - TTransport() {} -}; - -/** - * Generic factory class to make an input and output transport out of a - * source transport. Commonly used inside servers to make input and output - * streams out of raw clients. - * - */ -class TTransportFactory { - public: - TTransportFactory() {} - - virtual ~TTransportFactory() {} - - /** - * Default implementation does nothing, just returns the transport given. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return trans; - } - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_ diff --git service/include/thrift/transport/TTransportException.h service/include/thrift/transport/TTransportException.h deleted file mode 100644 index 330785c..0000000 --- service/include/thrift/transport/TTransportException.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ -#define _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1 - -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Class to encapsulate all the possible types of transport errors that may - * occur in various transport systems. This provides a sort of generic - * wrapper around the shitty UNIX E_ error codes that lets a common code - * base of error handling to be used for various types of transports, i.e. - * pipes etc. - * - */ -class TTransportException : public apache::thrift::TException { - public: - /** - * Error codes for the various types of exceptions. - */ - enum TTransportExceptionType - { UNKNOWN = 0 - , NOT_OPEN = 1 - , ALREADY_OPEN = 2 - , TIMED_OUT = 3 - , END_OF_FILE = 4 - , INTERRUPTED = 5 - , BAD_ARGS = 6 - , CORRUPTED_DATA = 7 - , INTERNAL_ERROR = 8 - }; - - TTransportException() : - apache::thrift::TException(), - type_(UNKNOWN) {} - - TTransportException(TTransportExceptionType type) : - apache::thrift::TException(), - type_(type) {} - - TTransportException(const std::string& message) : - apache::thrift::TException(message), - type_(UNKNOWN) {} - - TTransportException(TTransportExceptionType type, const std::string& message) : - apache::thrift::TException(message), - type_(type) {} - - TTransportException(TTransportExceptionType type, - const std::string& message, - int errno_copy) : - apache::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)), - type_(type) {} - - virtual ~TTransportException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TTransportExceptionType getType() const throw() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TTransportException: Unknown transport exception"; - case NOT_OPEN : return "TTransportException: Transport not open"; - case ALREADY_OPEN : return "TTransportException: Transport already open"; - case TIMED_OUT : return "TTransportException: Timed out"; - case END_OF_FILE : return "TTransportException: End of file"; - case INTERRUPTED : return "TTransportException: Interrupted"; - case BAD_ARGS : return "TTransportException: Invalid arguments"; - case CORRUPTED_DATA : return "TTransportException: Corrupted Data"; - case INTERNAL_ERROR : return "TTransportException: Internal error"; - default : return "TTransportException: (Invalid exception type)"; - } - } else { - return message_.c_str(); - } - } - - protected: - /** Just like strerror_r but returns a C++ string object. */ - std::string strerror_s(int errno_copy); - - /** Error code */ - TTransportExceptionType type_; - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ diff --git service/include/thrift/transport/TTransportUtils.h service/include/thrift/transport/TTransportUtils.h deleted file mode 100644 index d65c916..0000000 --- service/include/thrift/transport/TTransportUtils.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ -#define _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ 1 - -#include -#include -#include -#include -#include -// Include the buffered transports that used to be defined here. -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * The null transport is a dummy transport that doesn't actually do anything. - * It's sort of an analogy to /dev/null, you can never read anything from it - * and it will let you write anything you want to it, though it won't actually - * go anywhere. - * - */ -class TNullTransport : public TTransport { - public: - TNullTransport() {} - - ~TNullTransport() {} - - bool isOpen() { - return true; - } - - void open() {} - - void write(const uint8_t* /* buf */, uint32_t /* len */) { - return; - } - -}; - - -/** - * TPipedTransport. This transport allows piping of a request from one - * transport to another either when readEnd() or writeEnd(). The typical - * use case for this is to log a request or a reply to disk. - * The underlying buffer expands to a keep a copy of the entire - * request/response. - * - */ -class TPipedTransport : virtual public TTransport { - public: - TPipedTransport(boost::shared_ptr srcTrans, - boost::shared_ptr dstTrans) : - srcTrans_(srcTrans), - dstTrans_(dstTrans), - rBufSize_(512), rPos_(0), rLen_(0), - wBufSize_(512), wLen_(0) { - - // default is to to pipe the request when readEnd() is called - pipeOnRead_ = true; - pipeOnWrite_ = false; - - rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_); - wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_); - } - - TPipedTransport(boost::shared_ptr srcTrans, - boost::shared_ptr dstTrans, - uint32_t sz) : - srcTrans_(srcTrans), - dstTrans_(dstTrans), - rBufSize_(512), rPos_(0), rLen_(0), - wBufSize_(sz), wLen_(0) { - - rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_); - wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_); - } - - ~TPipedTransport() { - std::free(rBuf_); - std::free(wBuf_); - } - - bool isOpen() { - return srcTrans_->isOpen(); - } - - bool peek() { - if (rPos_ >= rLen_) { - // Double the size of the underlying buffer if it is full - if (rLen_ == rBufSize_) { - rBufSize_ *=2; - rBuf_ = (uint8_t *)std::realloc(rBuf_, sizeof(uint8_t) * rBufSize_); - } - - // try to fill up the buffer - rLen_ += srcTrans_->read(rBuf_+rPos_, rBufSize_ - rPos_); - } - return (rLen_ > rPos_); - } - - - void open() { - srcTrans_->open(); - } - - void close() { - srcTrans_->close(); - } - - void setPipeOnRead(bool pipeVal) { - pipeOnRead_ = pipeVal; - } - - void setPipeOnWrite(bool pipeVal) { - pipeOnWrite_ = pipeVal; - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void readEnd() { - - if (pipeOnRead_) { - dstTrans_->write(rBuf_, rPos_); - dstTrans_->flush(); - } - - srcTrans_->readEnd(); - - // If requests are being pipelined, copy down our read-ahead data, - // then reset our state. - int read_ahead = rLen_ - rPos_; - memcpy(rBuf_, rBuf_ + rPos_, read_ahead); - rPos_ = 0; - rLen_ = read_ahead; - } - - void write(const uint8_t* buf, uint32_t len); - - void writeEnd() { - if (pipeOnWrite_) { - dstTrans_->write(wBuf_, wLen_); - dstTrans_->flush(); - } - } - - void flush(); - - boost::shared_ptr getTargetTransport() { - return dstTrans_; - } - - protected: - boost::shared_ptr srcTrans_; - boost::shared_ptr dstTrans_; - - uint8_t* rBuf_; - uint32_t rBufSize_; - uint32_t rPos_; - uint32_t rLen_; - - uint8_t* wBuf_; - uint32_t wBufSize_; - uint32_t wLen_; - - bool pipeOnRead_; - bool pipeOnWrite_; -}; - - -/** - * Wraps a transport into a pipedTransport instance. - * - */ -class TPipedTransportFactory : public TTransportFactory { - public: - TPipedTransportFactory() {} - TPipedTransportFactory(boost::shared_ptr dstTrans) { - initializeTargetTransport(dstTrans); - } - virtual ~TPipedTransportFactory() {} - - /** - * Wraps the base transport into a piped transport. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr srcTrans) { - return boost::shared_ptr(new TPipedTransport(srcTrans, dstTrans_)); - } - - virtual void initializeTargetTransport(boost::shared_ptr dstTrans) { - if (dstTrans_.get() == NULL) { - dstTrans_ = dstTrans; - } else { - throw TException("Target transport already initialized"); - } - } - - protected: - boost::shared_ptr dstTrans_; -}; - -/** - * TPipedFileTransport. This is just like a TTransport, except that - * it is a templatized class, so that clients who rely on a specific - * TTransport can still access the original transport. - * - */ -class TPipedFileReaderTransport : public TPipedTransport, - public TFileReaderTransport { - public: - TPipedFileReaderTransport(boost::shared_ptr srcTrans, boost::shared_ptr dstTrans); - - ~TPipedFileReaderTransport(); - - // TTransport functions - bool isOpen(); - bool peek(); - void open(); - void close(); - uint32_t read(uint8_t* buf, uint32_t len); - uint32_t readAll(uint8_t* buf, uint32_t len); - void readEnd(); - void write(const uint8_t* buf, uint32_t len); - void writeEnd(); - void flush(); - - // TFileReaderTransport functions - int32_t getReadTimeout(); - void setReadTimeout(int32_t readTimeout); - uint32_t getNumChunks(); - uint32_t getCurChunk(); - void seekToChunk(int32_t chunk); - void seekToEnd(); - - protected: - // shouldn't be used - TPipedFileReaderTransport(); - boost::shared_ptr srcTrans_; -}; - -/** - * Creates a TPipedFileReaderTransport from a filepath and a destination transport - * - */ -class TPipedFileReaderTransportFactory : public TPipedTransportFactory { - public: - TPipedFileReaderTransportFactory() {} - TPipedFileReaderTransportFactory(boost::shared_ptr dstTrans) - : TPipedTransportFactory(dstTrans) - {} - virtual ~TPipedFileReaderTransportFactory() {} - - boost::shared_ptr getTransport(boost::shared_ptr srcTrans) { - boost::shared_ptr pFileReaderTransport = boost::dynamic_pointer_cast(srcTrans); - if (pFileReaderTransport.get() != NULL) { - return getFileReaderTransport(pFileReaderTransport); - } else { - return boost::shared_ptr(); - } - } - - boost::shared_ptr getFileReaderTransport(boost::shared_ptr srcTrans) { - return boost::shared_ptr(new TPipedFileReaderTransport(srcTrans, dstTrans_)); - } -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ diff --git service/include/thrift/transport/TZlibTransport.h service/include/thrift/transport/TZlibTransport.h deleted file mode 100644 index 1439d9d..0000000 --- service/include/thrift/transport/TZlibTransport.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ 1 - -#include -#include - -struct z_stream_s; - -namespace apache { namespace thrift { namespace transport { - -class TZlibTransportException : public TTransportException { - public: - TZlibTransportException(int status, const char* msg) : - TTransportException(TTransportException::INTERNAL_ERROR, - errorMessage(status, msg)), - zlib_status_(status), - zlib_msg_(msg == NULL ? "(null)" : msg) {} - - virtual ~TZlibTransportException() throw() {} - - int getZlibStatus() { return zlib_status_; } - std::string getZlibMessage() { return zlib_msg_; } - - static std::string errorMessage(int status, const char* msg) { - std::string rv = "zlib error: "; - if (msg) { - rv += msg; - } else { - rv += "(no message)"; - } - rv += " (status = "; - rv += boost::lexical_cast(status); - rv += ")"; - return rv; - } - - int zlib_status_; - std::string zlib_msg_; -}; - -/** - * This transport uses zlib's compressed format on the "far" side. - * - * There are two kinds of TZlibTransport objects: - * - Standalone objects are used to encode self-contained chunks of data - * (like structures). They include checksums. - * - Non-standalone transports are used for RPC. They are not implemented yet. - * - * TODO(dreiss): Don't do an extra copy of the compressed data if - * the underlying transport is TBuffered or TMemory. - * - */ -class TZlibTransport : public TTransport { - public: - - /** - * @param transport The transport to read compressed data from - * and write compressed data to. - * @param use_for_rpc True if this object will be used for RPC, - * false if this is a standalone object. - * @param urbuf_size Uncompressed buffer size for reading. - * @param crbuf_size Compressed buffer size for reading. - * @param uwbuf_size Uncompressed buffer size for writing. - * @param cwbuf_size Compressed buffer size for writing. - * - * TODO(dreiss): Write a constructor that isn't a pain. - */ - TZlibTransport(boost::shared_ptr transport, - bool use_for_rpc, - int urbuf_size = DEFAULT_URBUF_SIZE, - int crbuf_size = DEFAULT_CRBUF_SIZE, - int uwbuf_size = DEFAULT_UWBUF_SIZE, - int cwbuf_size = DEFAULT_CWBUF_SIZE) : - transport_(transport), - standalone_(!use_for_rpc), - urpos_(0), - uwpos_(0), - input_ended_(false), - output_flushed_(false), - urbuf_size_(urbuf_size), - crbuf_size_(crbuf_size), - uwbuf_size_(uwbuf_size), - cwbuf_size_(cwbuf_size), - urbuf_(NULL), - crbuf_(NULL), - uwbuf_(NULL), - cwbuf_(NULL), - rstream_(NULL), - wstream_(NULL) - { - - if (!standalone_) { - throw TTransportException( - TTransportException::BAD_ARGS, - "TZLibTransport has not been tested for RPC."); - } - - if (uwbuf_size_ < MIN_DIRECT_DEFLATE_SIZE) { - // Have to copy this into a local because of a linking issue. - int minimum = MIN_DIRECT_DEFLATE_SIZE; - throw TTransportException( - TTransportException::BAD_ARGS, - "TZLibTransport: uncompressed write buffer must be at least" - + boost::lexical_cast(minimum) + "."); - } - - try { - urbuf_ = new uint8_t[urbuf_size]; - crbuf_ = new uint8_t[crbuf_size]; - uwbuf_ = new uint8_t[uwbuf_size]; - cwbuf_ = new uint8_t[cwbuf_size]; - - // Don't call this outside of the constructor. - initZlib(); - - } catch (...) { - delete[] urbuf_; - delete[] crbuf_; - delete[] uwbuf_; - delete[] cwbuf_; - throw; - } - } - - // Don't call this outside of the constructor. - void initZlib(); - - ~TZlibTransport(); - - bool isOpen(); - - void open() { - transport_->open(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void write(const uint8_t* buf, uint32_t len); - - void flush(); - - const uint8_t* borrow(uint8_t* buf, uint32_t* len); - - void consume(uint32_t len); - - void verifyChecksum(); - - /** - * TODO(someone_smart): Choose smart defaults. - */ - static const int DEFAULT_URBUF_SIZE = 128; - static const int DEFAULT_CRBUF_SIZE = 1024; - static const int DEFAULT_UWBUF_SIZE = 128; - static const int DEFAULT_CWBUF_SIZE = 1024; - - protected: - - inline void checkZlibRv(int status, const char* msg); - inline void checkZlibRvNothrow(int status, const char* msg); - inline int readAvail(); - void flushToZlib(const uint8_t* buf, int len, bool finish = false); - - // Writes smaller than this are buffered up. - // Larger (or equal) writes are dumped straight to zlib. - static const int MIN_DIRECT_DEFLATE_SIZE = 32; - - boost::shared_ptr transport_; - bool standalone_; - - int urpos_; - int uwpos_; - - /// True iff zlib has reached the end of a stream. - /// This is only ever true in standalone protcol objects. - bool input_ended_; - /// True iff we have flushed the output stream. - /// This is only ever true in standalone protcol objects. - bool output_flushed_; - - int urbuf_size_; - int crbuf_size_; - int uwbuf_size_; - int cwbuf_size_; - - uint8_t* urbuf_; - uint8_t* crbuf_; - uint8_t* uwbuf_; - uint8_t* cwbuf_; - - struct z_stream_s* rstream_; - struct z_stream_s* wstream_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ diff --git service/src/gen-cpp/ThriftHive.cpp service/src/gen-cpp/ThriftHive.cpp 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 deleted file mode 100644 index bf5e917..0000000 --- service/src/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java +++ /dev/null @@ -1,549 +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 java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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); - private static final TField MAX_MAP_TASKS_FIELD_DESC = new TField("maxMapTasks", TType.I32, (short)4); - private static final TField MAX_REDUCE_TASKS_FIELD_DESC = new TField("maxReduceTasks", TType.I32, (short)5); - 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, - new FieldValueMetaData(TType.I32))); - put(REDUCETASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(MAXMAPTASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(MAXREDUCETASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap); - } - - public HiveClusterStatus() { - } - - public HiveClusterStatus( - int taskTrackers, - int mapTasks, - int reduceTasks, - int maxMapTasks, - int maxReduceTasks, - int state) - { - this(); - this.taskTrackers = taskTrackers; - this.__isset.taskTrackers = true; - this.mapTasks = mapTasks; - this.__isset.mapTasks = true; - this.reduceTasks = reduceTasks; - this.__isset.reduceTasks = true; - this.maxMapTasks = maxMapTasks; - this.__isset.maxMapTasks = true; - this.maxReduceTasks = maxReduceTasks; - this.__isset.maxReduceTasks = true; - this.state = state; - this.__isset.state = true; - } - - /** - * Performs a deep copy on other. - */ - public HiveClusterStatus(HiveClusterStatus other) { - __isset.taskTrackers = other.__isset.taskTrackers; - 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; - } - - @Override - public HiveClusterStatus clone() { - return new HiveClusterStatus(this); - } - - public int getTaskTrackers() { - return this.taskTrackers; - } - - public void setTaskTrackers(int taskTrackers) { - this.taskTrackers = taskTrackers; - this.__isset.taskTrackers = true; - } - - public void unsetTaskTrackers() { - this.__isset.taskTrackers = false; - } - - // Returns true if field taskTrackers is set (has been asigned a value) and false otherwise - public boolean isSetTaskTrackers() { - return this.__isset.taskTrackers; - } - - public int getMapTasks() { - return this.mapTasks; - } - - public void setMapTasks(int mapTasks) { - this.mapTasks = mapTasks; - this.__isset.mapTasks = true; - } - - public void unsetMapTasks() { - this.__isset.mapTasks = false; - } - - // Returns true if field mapTasks is set (has been asigned a value) and false otherwise - public boolean isSetMapTasks() { - return this.__isset.mapTasks; - } - - public int getReduceTasks() { - return this.reduceTasks; - } - - public void setReduceTasks(int reduceTasks) { - this.reduceTasks = reduceTasks; - this.__isset.reduceTasks = true; - } - - public void unsetReduceTasks() { - this.__isset.reduceTasks = false; - } - - // Returns true if field reduceTasks is set (has been asigned a value) and false otherwise - public boolean isSetReduceTasks() { - return this.__isset.reduceTasks; - } - - public int getMaxMapTasks() { - return this.maxMapTasks; - } - - public void setMaxMapTasks(int maxMapTasks) { - this.maxMapTasks = maxMapTasks; - this.__isset.maxMapTasks = true; - } - - public void unsetMaxMapTasks() { - this.__isset.maxMapTasks = false; - } - - // Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise - public boolean isSetMaxMapTasks() { - return this.__isset.maxMapTasks; - } - - public int getMaxReduceTasks() { - return this.maxReduceTasks; - } - - public void setMaxReduceTasks(int maxReduceTasks) { - this.maxReduceTasks = maxReduceTasks; - this.__isset.maxReduceTasks = true; - } - - public void unsetMaxReduceTasks() { - this.__isset.maxReduceTasks = false; - } - - // Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise - public boolean isSetMaxReduceTasks() { - return this.__isset.maxReduceTasks; - } - - public int getState() { - return this.state; - } - - public void setState(int state) { - this.state = state; - this.__isset.state = true; - } - - public void unsetState() { - this.__isset.state = false; - } - - // Returns true if field state is set (has been asigned a value) and false otherwise - public boolean isSetState() { - return this.__isset.state; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TASKTRACKERS: - if (value == null) { - unsetTaskTrackers(); - } else { - setTaskTrackers((Integer)value); - } - break; - - case MAPTASKS: - if (value == null) { - unsetMapTasks(); - } else { - setMapTasks((Integer)value); - } - break; - - case REDUCETASKS: - if (value == null) { - unsetReduceTasks(); - } else { - setReduceTasks((Integer)value); - } - break; - - case MAXMAPTASKS: - if (value == null) { - unsetMaxMapTasks(); - } else { - setMaxMapTasks((Integer)value); - } - break; - - case MAXREDUCETASKS: - if (value == null) { - unsetMaxReduceTasks(); - } else { - setMaxReduceTasks((Integer)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TASKTRACKERS: - return new Integer(getTaskTrackers()); - - case MAPTASKS: - return new Integer(getMapTasks()); - - case REDUCETASKS: - return new Integer(getReduceTasks()); - - case MAXMAPTASKS: - return new Integer(getMaxMapTasks()); - - case MAXREDUCETASKS: - return new Integer(getMaxReduceTasks()); - - case STATE: - return getState(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TASKTRACKERS: - return isSetTaskTrackers(); - case MAPTASKS: - return isSetMapTasks(); - case REDUCETASKS: - return isSetReduceTasks(); - case MAXMAPTASKS: - return isSetMaxMapTasks(); - case MAXREDUCETASKS: - return isSetMaxReduceTasks(); - case STATE: - return isSetState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HiveClusterStatus) - return this.equals((HiveClusterStatus)that); - return false; - } - - public boolean equals(HiveClusterStatus that) { - if (that == null) - return false; - - boolean this_present_taskTrackers = true; - boolean that_present_taskTrackers = true; - if (this_present_taskTrackers || that_present_taskTrackers) { - if (!(this_present_taskTrackers && that_present_taskTrackers)) - return false; - if (this.taskTrackers != that.taskTrackers) - return false; - } - - boolean this_present_mapTasks = true; - boolean that_present_mapTasks = true; - if (this_present_mapTasks || that_present_mapTasks) { - if (!(this_present_mapTasks && that_present_mapTasks)) - return false; - if (this.mapTasks != that.mapTasks) - return false; - } - - boolean this_present_reduceTasks = true; - boolean that_present_reduceTasks = true; - if (this_present_reduceTasks || that_present_reduceTasks) { - if (!(this_present_reduceTasks && that_present_reduceTasks)) - return false; - if (this.reduceTasks != that.reduceTasks) - return false; - } - - boolean this_present_maxMapTasks = true; - boolean that_present_maxMapTasks = true; - if (this_present_maxMapTasks || that_present_maxMapTasks) { - if (!(this_present_maxMapTasks && that_present_maxMapTasks)) - return false; - if (this.maxMapTasks != that.maxMapTasks) - return false; - } - - boolean this_present_maxReduceTasks = true; - boolean that_present_maxReduceTasks = true; - if (this_present_maxReduceTasks || that_present_maxReduceTasks) { - if (!(this_present_maxReduceTasks && that_present_maxReduceTasks)) - return false; - if (this.maxReduceTasks != that.maxReduceTasks) - return false; - } - - boolean this_present_state = true; - boolean that_present_state = true; - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (this.state != that.state) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case TASKTRACKERS: - if (field.type == TType.I32) { - this.taskTrackers = iprot.readI32(); - this.__isset.taskTrackers = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAPTASKS: - if (field.type == TType.I32) { - this.mapTasks = iprot.readI32(); - this.__isset.mapTasks = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case REDUCETASKS: - if (field.type == TType.I32) { - this.reduceTasks = iprot.readI32(); - this.__isset.reduceTasks = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAXMAPTASKS: - if (field.type == TType.I32) { - this.maxMapTasks = iprot.readI32(); - this.__isset.maxMapTasks = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAXREDUCETASKS: - if (field.type == TType.I32) { - this.maxReduceTasks = iprot.readI32(); - this.__isset.maxReduceTasks = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STATE: - if (field.type == TType.I32) { - this.state = iprot.readI32(); - this.__isset.state = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); - oprot.writeI32(this.taskTrackers); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.mapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.reduceTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.maxMapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.maxReduceTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(this.state); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("HiveClusterStatus("); - boolean first = true; - - sb.append("taskTrackers:"); - sb.append(this.taskTrackers); - first = false; - if (!first) sb.append(", "); - sb.append("mapTasks:"); - sb.append(this.mapTasks); - first = false; - if (!first) sb.append(", "); - sb.append("reduceTasks:"); - sb.append(this.reduceTasks); - first = false; - if (!first) sb.append(", "); - sb.append("maxMapTasks:"); - sb.append(this.maxMapTasks); - first = false; - if (!first) sb.append(", "); - sb.append("maxReduceTasks:"); - sb.append(this.maxReduceTasks); - 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(")"); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - 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 deleted file mode 100644 index 08594e1..0000000 --- service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java +++ /dev/null @@ -1,346 +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 java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(ERRORCODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(SQLSTATE, new FieldMetaData("SQLState", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(HiveServerException.class, metaDataMap); - } - - public HiveServerException() { - } - - public HiveServerException( - String message, - int errorCode, - String SQLState) - { - this(); - this.message = message; - this.errorCode = errorCode; - this.__isset.errorCode = true; - this.SQLState = SQLState; - } - - /** - * Performs a deep copy on other. - */ - public HiveServerException(HiveServerException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - __isset.errorCode = other.__isset.errorCode; - this.errorCode = other.errorCode; - if (other.isSetSQLState()) { - this.SQLState = other.SQLState; - } - } - - @Override - public HiveServerException clone() { - return new HiveServerException(this); - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - // Returns true if field message is set (has been asigned a value) and false otherwise - public boolean isSetMessage() { - return this.message != null; - } - - public int getErrorCode() { - return this.errorCode; - } - - public void setErrorCode(int errorCode) { - this.errorCode = errorCode; - this.__isset.errorCode = true; - } - - public void unsetErrorCode() { - this.__isset.errorCode = false; - } - - // Returns true if field errorCode is set (has been asigned a value) and false otherwise - public boolean isSetErrorCode() { - return this.__isset.errorCode; - } - - public String getSQLState() { - return this.SQLState; - } - - public void setSQLState(String SQLState) { - this.SQLState = SQLState; - } - - public void unsetSQLState() { - this.SQLState = null; - } - - // 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) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - case ERRORCODE: - if (value == null) { - unsetErrorCode(); - } else { - setErrorCode((Integer)value); - } - break; - - case SQLSTATE: - if (value == null) { - unsetSQLState(); - } else { - setSQLState((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MESSAGE: - return getMessage(); - - case ERRORCODE: - return new Integer(getErrorCode()); - - case SQLSTATE: - return getSQLState(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MESSAGE: - return isSetMessage(); - case ERRORCODE: - return isSetErrorCode(); - case SQLSTATE: - return isSetSQLState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HiveServerException) - return this.equals((HiveServerException)that); - return false; - } - - public boolean equals(HiveServerException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - boolean this_present_errorCode = true; - boolean that_present_errorCode = true; - if (this_present_errorCode || that_present_errorCode) { - if (!(this_present_errorCode && that_present_errorCode)) - return false; - if (this.errorCode != that.errorCode) - return false; - } - - boolean this_present_SQLState = true && this.isSetSQLState(); - boolean that_present_SQLState = true && that.isSetSQLState(); - if (this_present_SQLState || that_present_SQLState) { - if (!(this_present_SQLState && that_present_SQLState)) - return false; - if (!this.SQLState.equals(that.SQLState)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ERRORCODE: - if (field.type == TType.I32) { - this.errorCode = iprot.readI32(); - this.__isset.errorCode = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case SQLSTATE: - if (field.type == TType.STRING) { - this.SQLState = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); - oprot.writeI32(this.errorCode); - oprot.writeFieldEnd(); - if (this.SQLState != null) { - oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); - oprot.writeString(this.SQLState); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("HiveServerException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - if (!first) sb.append(", "); - sb.append("errorCode:"); - sb.append(this.errorCode); - first = false; - if (!first) sb.append(", "); - sb.append("SQLState:"); - if (this.SQLState == null) { - sb.append("null"); - } else { - sb.append(this.SQLState); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java deleted file mode 100644 index 67d0229..0000000 --- service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java +++ /dev/null @@ -1,28 +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.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.thrift.IntRangeSet; -import java.util.Map; -import java.util.HashMap; - -public class JobTrackerState { - public static final int INITIALIZING = 1; - public static final int RUNNING = 2; - - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - INITIALIZING, - RUNNING ); - - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(INITIALIZING, "INITIALIZING"); - put(RUNNING, "RUNNING"); - }}; -} diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java deleted file mode 100644 index e3160ca..0000000 --- service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java +++ /dev/null @@ -1,3733 +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 java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class ThriftHive { - - public interface Iface extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface { - - public void execute(String query) throws HiveServerException, TException; - - public String fetchOne() throws HiveServerException, TException; - - public List fetchN(int numRows) throws HiveServerException, TException; - - public List fetchAll() throws HiveServerException, TException; - - public org.apache.hadoop.hive.metastore.api.Schema getSchema() throws HiveServerException, TException; - - public org.apache.hadoop.hive.metastore.api.Schema getThriftSchema() throws HiveServerException, TException; - - public HiveClusterStatus getClusterStatus() throws HiveServerException, TException; - - public org.apache.hadoop.hive.ql.plan.api.QueryPlan getQueryPlan() throws HiveServerException, TException; - - } - - public static class Client extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Client implements Iface { - public Client(TProtocol prot) - { - this(prot, prot); - } - - public Client(TProtocol iprot, TProtocol oprot) - { - super(iprot, oprot); - } - - public void execute(String query) throws HiveServerException, TException - { - send_execute(query); - recv_execute(); - } - - public void send_execute(String query) throws TException - { - oprot_.writeMessageBegin(new TMessage("execute", TMessageType.CALL, seqid_)); - execute_args args = new execute_args(); - args.query = query; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public void recv_execute() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - execute_result result = new execute_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.ex != null) { - throw result.ex; - } - return; - } - - public String fetchOne() throws HiveServerException, TException - { - send_fetchOne(); - return recv_fetchOne(); - } - - public void send_fetchOne() throws TException - { - oprot_.writeMessageBegin(new TMessage("fetchOne", TMessageType.CALL, seqid_)); - fetchOne_args args = new fetchOne_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public String recv_fetchOne() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - fetchOne_result result = new fetchOne_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchOne failed: unknown result"); - } - - public List fetchN(int numRows) throws HiveServerException, TException - { - send_fetchN(numRows); - return recv_fetchN(); - } - - public void send_fetchN(int numRows) throws TException - { - oprot_.writeMessageBegin(new TMessage("fetchN", TMessageType.CALL, seqid_)); - fetchN_args args = new fetchN_args(); - args.numRows = numRows; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_fetchN() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - fetchN_result result = new fetchN_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchN failed: unknown result"); - } - - public List fetchAll() throws HiveServerException, TException - { - send_fetchAll(); - return recv_fetchAll(); - } - - public void send_fetchAll() throws TException - { - oprot_.writeMessageBegin(new TMessage("fetchAll", TMessageType.CALL, seqid_)); - fetchAll_args args = new fetchAll_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public List recv_fetchAll() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - fetchAll_result result = new fetchAll_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchAll failed: unknown result"); - } - - public org.apache.hadoop.hive.metastore.api.Schema getSchema() throws HiveServerException, TException - { - send_getSchema(); - return recv_getSchema(); - } - - public void send_getSchema() throws TException - { - oprot_.writeMessageBegin(new TMessage("getSchema", TMessageType.CALL, seqid_)); - getSchema_args args = new getSchema_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public org.apache.hadoop.hive.metastore.api.Schema recv_getSchema() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - getSchema_result result = new getSchema_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSchema failed: unknown result"); - } - - public org.apache.hadoop.hive.metastore.api.Schema getThriftSchema() throws HiveServerException, TException - { - send_getThriftSchema(); - return recv_getThriftSchema(); - } - - public void send_getThriftSchema() throws TException - { - oprot_.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.CALL, seqid_)); - getThriftSchema_args args = new getThriftSchema_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public org.apache.hadoop.hive.metastore.api.Schema recv_getThriftSchema() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - getThriftSchema_result result = new getThriftSchema_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getThriftSchema failed: unknown result"); - } - - public HiveClusterStatus getClusterStatus() throws HiveServerException, TException - { - send_getClusterStatus(); - return recv_getClusterStatus(); - } - - public void send_getClusterStatus() throws TException - { - oprot_.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.CALL, seqid_)); - getClusterStatus_args args = new getClusterStatus_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public HiveClusterStatus recv_getClusterStatus() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - getClusterStatus_result result = new getClusterStatus_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getClusterStatus failed: unknown result"); - } - - public org.apache.hadoop.hive.ql.plan.api.QueryPlan getQueryPlan() throws HiveServerException, TException - { - send_getQueryPlan(); - return recv_getQueryPlan(); - } - - public void send_getQueryPlan() throws TException - { - oprot_.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.CALL, seqid_)); - getQueryPlan_args args = new getQueryPlan_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - } - - public org.apache.hadoop.hive.ql.plan.api.QueryPlan recv_getQueryPlan() throws HiveServerException, TException - { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - getQueryPlan_result result = new getQueryPlan_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex != null) { - throw result.ex; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getQueryPlan failed: unknown result"); - } - - } - 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()); - public Processor(Iface iface) - { - super(iface); - iface_ = iface; - processMap_.put("execute", new execute()); - processMap_.put("fetchOne", new fetchOne()); - processMap_.put("fetchN", new fetchN()); - processMap_.put("fetchAll", new fetchAll()); - processMap_.put("getSchema", new getSchema()); - processMap_.put("getThriftSchema", new getThriftSchema()); - processMap_.put("getClusterStatus", new getClusterStatus()); - processMap_.put("getQueryPlan", new getQueryPlan()); - } - - 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 execute implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - execute_args args = new execute_args(); - args.read(iprot); - iprot.readMessageEnd(); - execute_result result = new execute_result(); - try { - iface_.execute(args.query); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing execute", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing execute"); - oprot.writeMessageBegin(new TMessage("execute", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("execute", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class fetchOne implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - fetchOne_args args = new fetchOne_args(); - args.read(iprot); - iprot.readMessageEnd(); - fetchOne_result result = new fetchOne_result(); - try { - result.success = iface_.fetchOne(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing fetchOne", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchOne"); - oprot.writeMessageBegin(new TMessage("fetchOne", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("fetchOne", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class fetchN implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - fetchN_args args = new fetchN_args(); - args.read(iprot); - iprot.readMessageEnd(); - fetchN_result result = new fetchN_result(); - try { - result.success = iface_.fetchN(args.numRows); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing fetchN", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchN"); - oprot.writeMessageBegin(new TMessage("fetchN", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("fetchN", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class fetchAll implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - fetchAll_args args = new fetchAll_args(); - args.read(iprot); - iprot.readMessageEnd(); - fetchAll_result result = new fetchAll_result(); - try { - result.success = iface_.fetchAll(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing fetchAll", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchAll"); - oprot.writeMessageBegin(new TMessage("fetchAll", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("fetchAll", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class getSchema implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getSchema_args args = new getSchema_args(); - args.read(iprot); - iprot.readMessageEnd(); - getSchema_result result = new getSchema_result(); - try { - result.success = iface_.getSchema(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing getSchema", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSchema"); - oprot.writeMessageBegin(new TMessage("getSchema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("getSchema", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class getThriftSchema implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getThriftSchema_args args = new getThriftSchema_args(); - args.read(iprot); - iprot.readMessageEnd(); - getThriftSchema_result result = new getThriftSchema_result(); - try { - result.success = iface_.getThriftSchema(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing getThriftSchema", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getThriftSchema"); - oprot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class getClusterStatus implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getClusterStatus_args args = new getClusterStatus_args(); - args.read(iprot); - iprot.readMessageEnd(); - getClusterStatus_result result = new getClusterStatus_result(); - try { - result.success = iface_.getClusterStatus(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing getClusterStatus", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getClusterStatus"); - oprot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - private class getQueryPlan implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getQueryPlan_args args = new getQueryPlan_args(); - args.read(iprot); - iprot.readMessageEnd(); - getQueryPlan_result result = new getQueryPlan_result(); - try { - result.success = iface_.getQueryPlan(); - } catch (HiveServerException ex) { - result.ex = ex; - } catch (Throwable th) { - LOGGER.error("Internal error processing getQueryPlan", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getQueryPlan"); - oprot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } - - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERY, new FieldMetaData("query", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(execute_args.class, metaDataMap); - } - - public execute_args() { - } - - public execute_args( - String query) - { - this(); - this.query = query; - } - - /** - * Performs a deep copy on other. - */ - public execute_args(execute_args other) { - if (other.isSetQuery()) { - this.query = other.query; - } - } - - @Override - public execute_args clone() { - return new execute_args(this); - } - - public String getQuery() { - return this.query; - } - - public void setQuery(String query) { - this.query = query; - } - - public void unsetQuery() { - this.query = null; - } - - // 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) { - case QUERY: - if (value == null) { - unsetQuery(); - } else { - setQuery((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case QUERY: - return getQuery(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case QUERY: - return isSetQuery(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof execute_args) - return this.equals((execute_args)that); - return false; - } - - public boolean equals(execute_args that) { - if (that == null) - return false; - - boolean this_present_query = true && this.isSetQuery(); - boolean that_present_query = true && that.isSetQuery(); - if (this_present_query || that_present_query) { - if (!(this_present_query && that_present_query)) - return false; - if (!this.query.equals(that.query)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case QUERY: - if (field.type == TType.STRING) { - this.query = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.query != null) { - oprot.writeFieldBegin(QUERY_FIELD_DESC); - oprot.writeString(this.query); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("execute_args("); - boolean first = true; - - sb.append("query:"); - if (this.query == null) { - sb.append("null"); - } else { - sb.append(this.query); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(execute_result.class, metaDataMap); - } - - public execute_result() { - } - - public execute_result( - HiveServerException ex) - { - this(); - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public execute_result(execute_result other) { - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public execute_result clone() { - return new execute_result(this); - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof execute_result) - return this.equals((execute_result)that); - return false; - } - - public boolean equals(execute_result that) { - if (that == null) - return false; - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("execute_result("); - boolean first = true; - - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - public static class fetchOne_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("fetchOne_args"); - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchOne_args.class, metaDataMap); - } - - public fetchOne_args() { - } - - /** - * Performs a deep copy on other. - */ - public fetchOne_args(fetchOne_args other) { - } - - @Override - public fetchOne_args clone() { - return new fetchOne_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchOne_args) - return this.equals((fetchOne_args)that); - return false; - } - - public boolean equals(fetchOne_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchOne_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchOne_result.class, metaDataMap); - } - - public fetchOne_result() { - } - - public fetchOne_result( - String success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public fetchOne_result(fetchOne_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public fetchOne_result clone() { - return new fetchOne_result(this); - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchOne_result) - return this.equals((fetchOne_result)that); - return false; - } - - public boolean equals(fetchOne_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRING) { - this.success = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchOne_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NUMROWS, new FieldMetaData("numRows", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchN_args.class, metaDataMap); - } - - public fetchN_args() { - } - - public fetchN_args( - int numRows) - { - this(); - this.numRows = numRows; - this.__isset.numRows = true; - } - - /** - * Performs a deep copy on other. - */ - public fetchN_args(fetchN_args other) { - __isset.numRows = other.__isset.numRows; - this.numRows = other.numRows; - } - - @Override - public fetchN_args clone() { - return new fetchN_args(this); - } - - public int getNumRows() { - return this.numRows; - } - - public void setNumRows(int numRows) { - this.numRows = numRows; - this.__isset.numRows = true; - } - - public void unsetNumRows() { - this.__isset.numRows = false; - } - - // Returns true if field numRows is set (has been asigned a value) and false otherwise - public boolean isSetNumRows() { - return this.__isset.numRows; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NUMROWS: - if (value == null) { - unsetNumRows(); - } else { - setNumRows((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NUMROWS: - return new Integer(getNumRows()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NUMROWS: - return isSetNumRows(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchN_args) - return this.equals((fetchN_args)that); - return false; - } - - public boolean equals(fetchN_args that) { - if (that == null) - return false; - - boolean this_present_numRows = true; - boolean that_present_numRows = true; - if (this_present_numRows || that_present_numRows) { - if (!(this_present_numRows && that_present_numRows)) - return false; - if (this.numRows != that.numRows) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case NUMROWS: - if (field.type == TType.I32) { - this.numRows = iprot.readI32(); - this.__isset.numRows = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); - oprot.writeI32(this.numRows); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchN_args("); - boolean first = true; - - sb.append("numRows:"); - sb.append(this.numRows); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchN_result.class, metaDataMap); - } - - public fetchN_result() { - } - - public fetchN_result( - List success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public fetchN_result(fetchN_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public fetchN_result clone() { - return new fetchN_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchN_result) - return this.equals((fetchN_result)that); - return false; - } - - public boolean equals(fetchN_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.success = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; - _elem2 = iprot.readString(); - this.success.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter3 : this.success) { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchN_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchAll_args.class, metaDataMap); - } - - public fetchAll_args() { - } - - /** - * Performs a deep copy on other. - */ - public fetchAll_args(fetchAll_args other) { - } - - @Override - 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!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchAll_args) - return this.equals((fetchAll_args)that); - return false; - } - - public boolean equals(fetchAll_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchAll_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(fetchAll_result.class, metaDataMap); - } - - public fetchAll_result() { - } - - public fetchAll_result( - List success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public fetchAll_result(fetchAll_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public fetchAll_result clone() { - return new fetchAll_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fetchAll_result) - return this.equals((fetchAll_result)that); - return false; - } - - public boolean equals(fetchAll_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list4 = iprot.readListBegin(); - this.success = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; - _elem6 = iprot.readString(); - this.success.add(_elem6); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter7 : this.success) { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("fetchAll_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(getSchema_args.class, metaDataMap); - } - - public getSchema_args() { - } - - /** - * Performs a deep copy on other. - */ - public getSchema_args(getSchema_args other) { - } - - @Override - public getSchema_args clone() { - return new getSchema_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getSchema_args) - return this.equals((getSchema_args)that); - return false; - } - - public boolean equals(getSchema_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getSchema_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(getSchema_result.class, metaDataMap); - } - - public getSchema_result() { - } - - public getSchema_result( - org.apache.hadoop.hive.metastore.api.Schema success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public getSchema_result(getSchema_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(other.success); - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public getSchema_result clone() { - return new getSchema_result(this); - } - - public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { - return this.success; - } - - public void setSuccess(org.apache.hadoop.hive.metastore.api.Schema success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.hadoop.hive.metastore.api.Schema)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getSchema_result) - return this.equals((getSchema_result)that); - return false; - } - - public boolean equals(getSchema_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getSchema_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(getThriftSchema_args.class, metaDataMap); - } - - public getThriftSchema_args() { - } - - /** - * Performs a deep copy on other. - */ - public getThriftSchema_args(getThriftSchema_args other) { - } - - @Override - public getThriftSchema_args clone() { - return new getThriftSchema_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getThriftSchema_args) - return this.equals((getThriftSchema_args)that); - return false; - } - - public boolean equals(getThriftSchema_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getThriftSchema_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(getThriftSchema_result.class, metaDataMap); - } - - public getThriftSchema_result() { - } - - public getThriftSchema_result( - org.apache.hadoop.hive.metastore.api.Schema success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public getThriftSchema_result(getThriftSchema_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(other.success); - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public getThriftSchema_result clone() { - return new getThriftSchema_result(this); - } - - public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { - return this.success; - } - - public void setSuccess(org.apache.hadoop.hive.metastore.api.Schema success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.hadoop.hive.metastore.api.Schema)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getThriftSchema_result) - return this.equals((getThriftSchema_result)that); - return false; - } - - public boolean equals(getThriftSchema_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getThriftSchema_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(getClusterStatus_args.class, metaDataMap); - } - - public getClusterStatus_args() { - } - - /** - * Performs a deep copy on other. - */ - public getClusterStatus_args(getClusterStatus_args other) { - } - - @Override - public getClusterStatus_args clone() { - return new getClusterStatus_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getClusterStatus_args) - return this.equals((getClusterStatus_args)that); - return false; - } - - public boolean equals(getClusterStatus_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getClusterStatus_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(getClusterStatus_result.class, metaDataMap); - } - - public getClusterStatus_result() { - } - - public getClusterStatus_result( - HiveClusterStatus success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public getClusterStatus_result(getClusterStatus_result other) { - if (other.isSetSuccess()) { - this.success = new HiveClusterStatus(other.success); - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public getClusterStatus_result clone() { - return new getClusterStatus_result(this); - } - - public HiveClusterStatus getSuccess() { - return this.success; - } - - public void setSuccess(HiveClusterStatus success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((HiveClusterStatus)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getClusterStatus_result) - return this.equals((getClusterStatus_result)that); - return false; - } - - public boolean equals(getClusterStatus_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new HiveClusterStatus(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getClusterStatus_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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() {{ - }}); - - static { - FieldMetaData.addStructMetaDataMap(getQueryPlan_args.class, metaDataMap); - } - - public getQueryPlan_args() { - } - - /** - * Performs a deep copy on other. - */ - public getQueryPlan_args(getQueryPlan_args other) { - } - - @Override - public getQueryPlan_args clone() { - return new getQueryPlan_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - 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(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getQueryPlan_args) - return this.equals((getQueryPlan_args)that); - return false; - } - - public boolean equals(getQueryPlan_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getQueryPlan_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - } - - 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))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(getQueryPlan_result.class, metaDataMap); - } - - public getQueryPlan_result() { - } - - public getQueryPlan_result( - org.apache.hadoop.hive.ql.plan.api.QueryPlan success, - HiveServerException ex) - { - this(); - this.success = success; - this.ex = ex; - } - - /** - * Performs a deep copy on other. - */ - public getQueryPlan_result(getQueryPlan_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(other.success); - } - if (other.isSetEx()) { - this.ex = new HiveServerException(other.ex); - } - } - - @Override - public getQueryPlan_result clone() { - return new getQueryPlan_result(this); - } - - public org.apache.hadoop.hive.ql.plan.api.QueryPlan getSuccess() { - return this.success; - } - - public void setSuccess(org.apache.hadoop.hive.ql.plan.api.QueryPlan success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; - } - - public HiveServerException getEx() { - return this.ex; - } - - public void setEx(HiveServerException ex) { - this.ex = ex; - } - - public void unsetEx() { - this.ex = null; - } - - // 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) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.hadoop.hive.ql.plan.api.QueryPlan)value); - } - break; - - case EX: - if (value == null) { - unsetEx(); - } else { - setEx((HiveServerException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case EX: - return getEx(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case EX: - return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getQueryPlan_result) - return this.equals((getQueryPlan_result)that); - return false; - } - - public boolean equals(getQueryPlan_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex = true && this.isSetEx(); - boolean that_present_ex = true && that.isSetEx(); - if (this_present_ex || that_present_ex) { - if (!(this_present_ex && that_present_ex)) - return false; - if (!this.ex.equals(that.ex)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EX: - if (field.type == TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getQueryPlan_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex:"); - if (this.ex == null) { - sb.append("null"); - } else { - sb.append(this.ex); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - -} diff --git 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_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/__init__.py service/src/gen-py/__init__.py deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index af87cdc..0000000 --- service/src/gen-py/hive_service/ThriftHive-remote +++ /dev/null @@ -1,128 +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 ' Schema getSchema()' - print ' Schema getThriftSchema()' - print ' HiveClusterStatus getClusterStatus()' - print ' QueryPlan getQueryPlan()' - 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()) - -elif cmd == 'getThriftSchema': - if len(args) != 0: - print 'getThriftSchema requires 0 args' - sys.exit(1) - pp.pprint(client.getThriftSchema()) - -elif cmd == 'getClusterStatus': - if len(args) != 0: - print 'getClusterStatus requires 0 args' - sys.exit(1) - pp.pprint(client.getClusterStatus()) - -elif cmd == 'getQueryPlan': - if len(args) != 0: - print 'getQueryPlan requires 0 args' - sys.exit(1) - pp.pprint(client.getQueryPlan()) - -transport.close() diff --git service/src/gen-py/hive_service/ThriftHive.py service/src/gen-py/hive_service/ThriftHive.py deleted file mode 100644 index e40baa8..0000000 --- service/src/gen-py/hive_service/ThriftHive.py +++ /dev/null @@ -1,1317 +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): - """ - Parameters: - - query - """ - pass - - def fetchOne(self, ): - pass - - def fetchN(self, numRows): - """ - Parameters: - - numRows - """ - pass - - def fetchAll(self, ): - pass - - def getSchema(self, ): - pass - - def getThriftSchema(self, ): - pass - - def getClusterStatus(self, ): - pass - - def getQueryPlan(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): - """ - Parameters: - - 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): - """ - Parameters: - - 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"); - - def getThriftSchema(self, ): - self.send_getThriftSchema() - return self.recv_getThriftSchema() - - def send_getThriftSchema(self, ): - self._oprot.writeMessageBegin('getThriftSchema', TMessageType.CALL, self._seqid) - args = getThriftSchema_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getThriftSchema(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getThriftSchema_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, "getThriftSchema failed: unknown result"); - - def getClusterStatus(self, ): - self.send_getClusterStatus() - return self.recv_getClusterStatus() - - def send_getClusterStatus(self, ): - self._oprot.writeMessageBegin('getClusterStatus', TMessageType.CALL, self._seqid) - args = getClusterStatus_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getClusterStatus(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getClusterStatus_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, "getClusterStatus failed: unknown result"); - - def getQueryPlan(self, ): - self.send_getQueryPlan() - return self.recv_getQueryPlan() - - def send_getQueryPlan(self, ): - self._oprot.writeMessageBegin('getQueryPlan', TMessageType.CALL, self._seqid) - args = getQueryPlan_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getQueryPlan(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getQueryPlan_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, "getQueryPlan 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 - self._processMap["getThriftSchema"] = Processor.process_getThriftSchema - self._processMap["getClusterStatus"] = Processor.process_getClusterStatus - self._processMap["getQueryPlan"] = Processor.process_getQueryPlan - - 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() - - def process_getThriftSchema(self, seqid, iprot, oprot): - args = getThriftSchema_args() - args.read(iprot) - iprot.readMessageEnd() - result = getThriftSchema_result() - try: - result.success = self._handler.getThriftSchema() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getClusterStatus(self, seqid, iprot, oprot): - args = getClusterStatus_args() - args.read(iprot) - iprot.readMessageEnd() - result = getClusterStatus_result() - try: - result.success = self._handler.getClusterStatus() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getQueryPlan(self, seqid, iprot, oprot): - args = getQueryPlan_args() - args.read(iprot) - iprot.readMessageEnd() - result = getQueryPlan_result() - try: - result.success = self._handler.getQueryPlan() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class execute_args: - """ - Attributes: - - query - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'query', None, None, ), # 1 - ) - - def __init__(self, query=None,): - self.query = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class execute_result: - """ - Attributes: - - ex - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, ex=None,): - self.ex = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchOne_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fetchOne_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchOne_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchN_args: - """ - Attributes: - - numRows - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'numRows', None, None, ), # 1 - ) - - def __init__(self, numRows=None,): - self.numRows = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchN_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchAll_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fetchAll_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchAll_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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 __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getSchema_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSchema_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getSchema_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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.STRUCT: - self.success = hive_metastore.ttypes.Schema() - self.success.read(iprot) - 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.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getThriftSchema_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getThriftSchema_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getThriftSchema_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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.STRUCT: - self.success = hive_metastore.ttypes.Schema() - self.success.read(iprot) - 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('getThriftSchema_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getClusterStatus_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getClusterStatus_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getClusterStatus_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (HiveClusterStatus, HiveClusterStatus.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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.STRUCT: - self.success = HiveClusterStatus() - self.success.read(iprot) - 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('getClusterStatus_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getQueryPlan_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getQueryPlan_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getQueryPlan_result: - """ - Attributes: - - success - - ex - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (queryplan.ttypes.QueryPlan, queryplan.ttypes.QueryPlan.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, ex=None,): - self.success = success - self.ex = 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.STRUCT: - self.success = queryplan.ttypes.QueryPlan() - self.success.read(iprot) - 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('getQueryPlan_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - diff --git service/src/gen-py/hive_service/__init__.py service/src/gen-py/hive_service/__init__.py deleted file mode 100644 index 6a0dcc9..0000000 --- service/src/gen-py/hive_service/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'ThriftHive'] diff --git service/src/gen-py/hive_service/constants.py service/src/gen-py/hive_service/constants.py deleted file mode 100644 index 2f17ec3..0000000 --- service/src/gen-py/hive_service/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_service/ttypes.py service/src/gen-py/hive_service/ttypes.py deleted file mode 100644 index 3e52549..0000000 --- service/src/gen-py/hive_service/ttypes.py +++ /dev/null @@ -1,223 +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 -import queryplan.ttypes - - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class JobTrackerState: - INITIALIZING = 1 - RUNNING = 2 - -class HiveClusterStatus: - """ - Attributes: - - taskTrackers - - mapTasks - - reduceTasks - - maxMapTasks - - maxReduceTasks - - state - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'taskTrackers', None, None, ), # 1 - (2, TType.I32, 'mapTasks', None, None, ), # 2 - (3, TType.I32, 'reduceTasks', None, None, ), # 3 - (4, TType.I32, 'maxMapTasks', None, None, ), # 4 - (5, TType.I32, 'maxReduceTasks', None, None, ), # 5 - (6, TType.I32, 'state', None, None, ), # 6 - ) - - def __init__(self, taskTrackers=None, mapTasks=None, reduceTasks=None, maxMapTasks=None, maxReduceTasks=None, state=None,): - self.taskTrackers = taskTrackers - self.mapTasks = mapTasks - self.reduceTasks = reduceTasks - self.maxMapTasks = maxMapTasks - self.maxReduceTasks = maxReduceTasks - self.state = state - - 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.taskTrackers = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.mapTasks = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.reduceTasks = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.maxMapTasks = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.maxReduceTasks = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.state = 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('HiveClusterStatus') - if self.taskTrackers != None: - oprot.writeFieldBegin('taskTrackers', TType.I32, 1) - oprot.writeI32(self.taskTrackers) - oprot.writeFieldEnd() - if self.mapTasks != None: - oprot.writeFieldBegin('mapTasks', TType.I32, 2) - oprot.writeI32(self.mapTasks) - oprot.writeFieldEnd() - if self.reduceTasks != None: - oprot.writeFieldBegin('reduceTasks', TType.I32, 3) - oprot.writeI32(self.reduceTasks) - oprot.writeFieldEnd() - if self.maxMapTasks != None: - oprot.writeFieldBegin('maxMapTasks', TType.I32, 4) - oprot.writeI32(self.maxMapTasks) - oprot.writeFieldEnd() - if self.maxReduceTasks != None: - oprot.writeFieldBegin('maxReduceTasks', TType.I32, 5) - oprot.writeI32(self.maxReduceTasks) - oprot.writeFieldEnd() - if self.state != None: - oprot.writeFieldBegin('state', TType.I32, 6) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HiveServerException(Exception): - """ - Attributes: - - message - - errorCode - - SQLState - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - (2, TType.I32, 'errorCode', None, None, ), # 2 - (3, TType.STRING, 'SQLState', None, None, ), # 3 - ) - - def __init__(self, message=None, errorCode=None, SQLState=None,): - self.message = message - self.errorCode = errorCode - self.SQLState = SQLState - - 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) - elif fid == 2: - if ftype == TType.I32: - self.errorCode = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.SQLState = 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() - if self.errorCode != None: - oprot.writeFieldBegin('errorCode', TType.I32, 2) - oprot.writeI32(self.errorCode) - oprot.writeFieldEnd() - if self.SQLState != None: - oprot.writeFieldBegin('SQLState', TType.STRING, 3) - oprot.writeString(self.SQLState) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - diff --git 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/gen/thrift/gen-cpp/ThriftHive.cpp service/src/gen/thrift/gen-cpp/ThriftHive.cpp new file mode 100644 index 0000000..6ecf2ca --- /dev/null +++ service/src/gen/thrift/gen-cpp/ThriftHive.cpp @@ -0,0 +1,2171 @@ +/** + * 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; +} + +uint32_t ThriftHive_getQueryPlan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_args"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_pargs"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + 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"); +} + +void ThriftHiveClient::getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +{ + send_getQueryPlan(); + recv_getQueryPlan(_return); +} + +void ThriftHiveClient::send_getQueryPlan() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHive_getQueryPlan_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveClient::recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("getQueryPlan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHive_getQueryPlan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getQueryPlan failed: unknown result"); +} + +bool ThriftHiveProcessor::process(boost::shared_ptr< ::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(); + 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(); +} + +void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHive_getQueryPlan_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHive_getQueryPlan_result result; + try { + iface_->getQueryPlan(result.success); + result.__isset.success = true; + } catch (HiveServerException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +}}} // namespace + diff --git service/src/gen/thrift/gen-cpp/ThriftHive.h service/src/gen/thrift/gen-cpp/ThriftHive.h new file mode 100644 index 0000000..70b12d8 --- /dev/null +++ service/src/gen/thrift/gen-cpp/ThriftHive.h @@ -0,0 +1,1021 @@ +/** + * 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; + virtual void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _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; + } + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& /* _return */) { + return; + } +}; + +typedef struct _ThriftHive_execute_args__isset { + _ThriftHive_execute_args__isset() : query(false) {} + bool query; +} _ThriftHive_execute_args__isset; + +class ThriftHive_execute_args { + public: + + ThriftHive_execute_args() : query("") { + } + + virtual ~ThriftHive_execute_args() throw() {} + + std::string query; + + _ThriftHive_execute_args__isset __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; + +}; + +typedef struct _ThriftHive_execute_result__isset { + _ThriftHive_execute_result__isset() : ex(false) {} + bool ex; +} _ThriftHive_execute_result__isset; + +class ThriftHive_execute_result { + public: + + ThriftHive_execute_result() { + } + + virtual ~ThriftHive_execute_result() throw() {} + + HiveServerException ex; + + _ThriftHive_execute_result__isset __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; + +}; + +typedef struct _ThriftHive_execute_presult__isset { + _ThriftHive_execute_presult__isset() : ex(false) {} + bool ex; +} _ThriftHive_execute_presult__isset; + +class ThriftHive_execute_presult { + public: + + + virtual ~ThriftHive_execute_presult() throw() {} + + HiveServerException ex; + + _ThriftHive_execute_presult__isset __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; + +}; + +typedef struct _ThriftHive_fetchOne_result__isset { + _ThriftHive_fetchOne_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchOne_result__isset; + +class ThriftHive_fetchOne_result { + public: + + ThriftHive_fetchOne_result() : success("") { + } + + virtual ~ThriftHive_fetchOne_result() throw() {} + + std::string success; + HiveServerException ex; + + _ThriftHive_fetchOne_result__isset __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; + +}; + +typedef struct _ThriftHive_fetchOne_presult__isset { + _ThriftHive_fetchOne_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchOne_presult__isset; + +class ThriftHive_fetchOne_presult { + public: + + + virtual ~ThriftHive_fetchOne_presult() throw() {} + + std::string* success; + HiveServerException ex; + + _ThriftHive_fetchOne_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHive_fetchN_args__isset { + _ThriftHive_fetchN_args__isset() : numRows(false) {} + bool numRows; +} _ThriftHive_fetchN_args__isset; + +class ThriftHive_fetchN_args { + public: + + ThriftHive_fetchN_args() : numRows(0) { + } + + virtual ~ThriftHive_fetchN_args() throw() {} + + int32_t numRows; + + _ThriftHive_fetchN_args__isset __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; + +}; + +typedef struct _ThriftHive_fetchN_result__isset { + _ThriftHive_fetchN_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchN_result__isset; + +class ThriftHive_fetchN_result { + public: + + ThriftHive_fetchN_result() { + } + + virtual ~ThriftHive_fetchN_result() throw() {} + + std::vector success; + HiveServerException ex; + + _ThriftHive_fetchN_result__isset __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; + +}; + +typedef struct _ThriftHive_fetchN_presult__isset { + _ThriftHive_fetchN_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchN_presult__isset; + +class ThriftHive_fetchN_presult { + public: + + + virtual ~ThriftHive_fetchN_presult() throw() {} + + std::vector * success; + HiveServerException ex; + + _ThriftHive_fetchN_presult__isset __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; + +}; + +typedef struct _ThriftHive_fetchAll_result__isset { + _ThriftHive_fetchAll_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchAll_result__isset; + +class ThriftHive_fetchAll_result { + public: + + ThriftHive_fetchAll_result() { + } + + virtual ~ThriftHive_fetchAll_result() throw() {} + + std::vector success; + HiveServerException ex; + + _ThriftHive_fetchAll_result__isset __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; + +}; + +typedef struct _ThriftHive_fetchAll_presult__isset { + _ThriftHive_fetchAll_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchAll_presult__isset; + +class ThriftHive_fetchAll_presult { + public: + + + virtual ~ThriftHive_fetchAll_presult() throw() {} + + std::vector * success; + HiveServerException ex; + + _ThriftHive_fetchAll_presult__isset __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; + +}; + +typedef struct _ThriftHive_getSchema_result__isset { + _ThriftHive_getSchema_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getSchema_result__isset; + +class ThriftHive_getSchema_result { + public: + + ThriftHive_getSchema_result() { + } + + virtual ~ThriftHive_getSchema_result() throw() {} + + Apache::Hadoop::Hive::Schema success; + HiveServerException ex; + + _ThriftHive_getSchema_result__isset __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; + +}; + +typedef struct _ThriftHive_getSchema_presult__isset { + _ThriftHive_getSchema_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getSchema_presult__isset; + +class ThriftHive_getSchema_presult { + public: + + + virtual ~ThriftHive_getSchema_presult() throw() {} + + Apache::Hadoop::Hive::Schema* success; + HiveServerException ex; + + _ThriftHive_getSchema_presult__isset __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; + +}; + +typedef struct _ThriftHive_getThriftSchema_result__isset { + _ThriftHive_getThriftSchema_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getThriftSchema_result__isset; + +class ThriftHive_getThriftSchema_result { + public: + + ThriftHive_getThriftSchema_result() { + } + + virtual ~ThriftHive_getThriftSchema_result() throw() {} + + Apache::Hadoop::Hive::Schema success; + HiveServerException ex; + + _ThriftHive_getThriftSchema_result__isset __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; + +}; + +typedef struct _ThriftHive_getThriftSchema_presult__isset { + _ThriftHive_getThriftSchema_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getThriftSchema_presult__isset; + +class ThriftHive_getThriftSchema_presult { + public: + + + virtual ~ThriftHive_getThriftSchema_presult() throw() {} + + Apache::Hadoop::Hive::Schema* success; + HiveServerException ex; + + _ThriftHive_getThriftSchema_presult__isset __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; + +}; + +typedef struct _ThriftHive_getClusterStatus_result__isset { + _ThriftHive_getClusterStatus_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getClusterStatus_result__isset; + +class ThriftHive_getClusterStatus_result { + public: + + ThriftHive_getClusterStatus_result() { + } + + virtual ~ThriftHive_getClusterStatus_result() throw() {} + + HiveClusterStatus success; + HiveServerException ex; + + _ThriftHive_getClusterStatus_result__isset __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; + +}; + +typedef struct _ThriftHive_getClusterStatus_presult__isset { + _ThriftHive_getClusterStatus_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getClusterStatus_presult__isset; + +class ThriftHive_getClusterStatus_presult { + public: + + + virtual ~ThriftHive_getClusterStatus_presult() throw() {} + + HiveClusterStatus* success; + HiveServerException ex; + + _ThriftHive_getClusterStatus_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHive_getQueryPlan_args { + public: + + ThriftHive_getQueryPlan_args() { + } + + virtual ~ThriftHive_getQueryPlan_args() throw() {} + + + bool operator == (const ThriftHive_getQueryPlan_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHive_getQueryPlan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHive_getQueryPlan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHive_getQueryPlan_pargs { + public: + + + virtual ~ThriftHive_getQueryPlan_pargs() throw() {} + + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHive_getQueryPlan_result__isset { + _ThriftHive_getQueryPlan_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getQueryPlan_result__isset; + +class ThriftHive_getQueryPlan_result { + public: + + ThriftHive_getQueryPlan_result() { + } + + virtual ~ThriftHive_getQueryPlan_result() throw() {} + + Apache::Hadoop::Hive::QueryPlan success; + HiveServerException ex; + + _ThriftHive_getQueryPlan_result__isset __isset; + + bool operator == (const ThriftHive_getQueryPlan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const ThriftHive_getQueryPlan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHive_getQueryPlan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHive_getQueryPlan_presult__isset { + _ThriftHive_getQueryPlan_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getQueryPlan_presult__isset; + +class ThriftHive_getQueryPlan_presult { + public: + + + virtual ~ThriftHive_getQueryPlan_presult() throw() {} + + Apache::Hadoop::Hive::QueryPlan* success; + HiveServerException ex; + + _ThriftHive_getQueryPlan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreClient { + public: + ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} + ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : + Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> 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); + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void send_getQueryPlan(); + void recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); +}; + +class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { + 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); + void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + public: + ThriftHiveProcessor(boost::shared_ptr iface) : + Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), + 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; + processMap_["getQueryPlan"] = &ThriftHiveProcessor::process_getQueryPlan; + } + + virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> 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); + } + } + } + + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getQueryPlan(_return); + return; + } else { + ifaces_[i]->getQueryPlan(_return); + } + } + } + +}; + +}}} // namespace + +#endif diff --git service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp new file mode 100644 index 0000000..7651d92 --- /dev/null +++ service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp @@ -0,0 +1,79 @@ +// 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"); + } + + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + // Your implementation goes here + printf("getQueryPlan\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/thrift/gen-cpp/hive_service_constants.cpp service/src/gen/thrift/gen-cpp/hive_service_constants.cpp new file mode 100644 index 0000000..7ee5b0c --- /dev/null +++ service/src/gen/thrift/gen-cpp/hive_service_constants.cpp @@ -0,0 +1,16 @@ +/** + * 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/thrift/gen-cpp/hive_service_constants.h service/src/gen/thrift/gen-cpp/hive_service_constants.h new file mode 100644 index 0000000..821dead --- /dev/null +++ service/src/gen/thrift/gen-cpp/hive_service_constants.h @@ -0,0 +1,23 @@ +/** + * 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/thrift/gen-cpp/hive_service_types.cpp service/src/gen/thrift/gen-cpp/hive_service_types.cpp new file mode 100644 index 0000000..321f424 --- /dev/null +++ service/src/gen/thrift/gen-cpp/hive_service_types.cpp @@ -0,0 +1,197 @@ +/** + * 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::type)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 = "70563A0628F75DF9555F4D24690B1E26"; +const uint8_t HiveServerException::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + +uint32_t HiveServerException::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->errorCode); + this->__isset.errorCode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->SQLState); + this->__isset.SQLState = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + 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->writeFieldBegin("errorCode", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->errorCode); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("SQLState", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->SQLState); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +}}} // namespace diff --git service/src/gen/thrift/gen-cpp/hive_service_types.h service/src/gen/thrift/gen-cpp/hive_service_types.h new file mode 100644 index 0000000..61dfb20 --- /dev/null +++ service/src/gen/thrift/gen-cpp/hive_service_types.h @@ -0,0 +1,132 @@ +/** + * 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 + +#include "fb303_types.h" +#include "hive_metastore_types.h" +#include "queryplan_types.h" + + +namespace Apache { namespace Hadoop { namespace Hive { + +struct JobTrackerState { + enum type { + INITIALIZING = 1, + RUNNING = 2 + }; +}; + +typedef struct _HiveClusterStatus__isset { + _HiveClusterStatus__isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {} + bool taskTrackers; + bool mapTasks; + bool reduceTasks; + bool maxMapTasks; + bool maxReduceTasks; + bool state; +} _HiveClusterStatus__isset; + +class HiveClusterStatus { + public: + + 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::type state; + + _HiveClusterStatus__isset __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; + +}; + +typedef struct _HiveServerException__isset { + _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {} + bool message; + bool errorCode; + bool SQLState; +} _HiveServerException__isset; + +class HiveServerException : public ::apache::thrift::TException { + public: + + static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; + static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + + HiveServerException() : message(""), errorCode(0), SQLState("") { + } + + virtual ~HiveServerException() throw() {} + + std::string message; + int32_t errorCode; + std::string SQLState; + + _HiveServerException__isset __isset; + + bool operator == (const HiveServerException & rhs) const + { + if (!(message == rhs.message)) + return false; + if (!(errorCode == rhs.errorCode)) + return false; + if (!(SQLState == rhs.SQLState)) + return false; + return true; + } + bool operator != (const HiveServerException &rhs) const { + 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/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java new file mode 100644 index 0000000..c267692 --- /dev/null +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java @@ -0,0 +1,736 @@ +/** + * 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.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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); + private static final TField MAX_MAP_TASKS_FIELD_DESC = new TField("maxMapTasks", TType.I32, (short)4); + private static final TField MAX_REDUCE_TASKS_FIELD_DESC = new TField("maxReduceTasks", TType.I32, (short)5); + private static final TField STATE_FIELD_DESC = new TField("state", TType.I32, (short)6); + + private int taskTrackers; + private int mapTasks; + private int reduceTasks; + private int maxMapTasks; + private int maxReduceTasks; + 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))); + tmpMap.put(_Fields.MAP_TASKS, new FieldMetaData("mapTasks", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.REDUCE_TASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.MAX_MAP_TASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.MAX_REDUCE_TASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, JobTrackerState.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap); + } + + public HiveClusterStatus() { + } + + public HiveClusterStatus( + int taskTrackers, + int mapTasks, + int reduceTasks, + int maxMapTasks, + int maxReduceTasks, + JobTrackerState state) + { + this(); + this.taskTrackers = taskTrackers; + setTaskTrackersIsSet(true); + this.mapTasks = mapTasks; + setMapTasksIsSet(true); + this.reduceTasks = reduceTasks; + setReduceTasksIsSet(true); + this.maxMapTasks = maxMapTasks; + setMaxMapTasksIsSet(true); + this.maxReduceTasks = maxReduceTasks; + setMaxReduceTasksIsSet(true); + this.state = state; + } + + /** + * Performs a deep copy on other. + */ + public HiveClusterStatus(HiveClusterStatus other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.taskTrackers = other.taskTrackers; + this.mapTasks = other.mapTasks; + this.reduceTasks = other.reduceTasks; + this.maxMapTasks = other.maxMapTasks; + this.maxReduceTasks = other.maxReduceTasks; + if (other.isSetState()) { + this.state = other.state; + } + } + + public HiveClusterStatus deepCopy() { + return new HiveClusterStatus(this); + } + + @Override + public void clear() { + setTaskTrackersIsSet(false); + this.taskTrackers = 0; + setMapTasksIsSet(false); + this.mapTasks = 0; + setReduceTasksIsSet(false); + this.reduceTasks = 0; + setMaxMapTasksIsSet(false); + this.maxMapTasks = 0; + setMaxReduceTasksIsSet(false); + this.maxReduceTasks = 0; + this.state = null; + } + + public int getTaskTrackers() { + return this.taskTrackers; + } + + public void setTaskTrackers(int taskTrackers) { + this.taskTrackers = taskTrackers; + setTaskTrackersIsSet(true); + } + + public void unsetTaskTrackers() { + __isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID); + } + + /** Returns true if field taskTrackers is set (has been asigned a value) and false otherwise */ + public boolean isSetTaskTrackers() { + return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID); + } + + public void setTaskTrackersIsSet(boolean value) { + __isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value); + } + + public int getMapTasks() { + return this.mapTasks; + } + + public void setMapTasks(int mapTasks) { + this.mapTasks = mapTasks; + setMapTasksIsSet(true); + } + + public void unsetMapTasks() { + __isset_bit_vector.clear(__MAPTASKS_ISSET_ID); + } + + /** Returns true if field mapTasks is set (has been asigned a value) and false otherwise */ + public boolean isSetMapTasks() { + return __isset_bit_vector.get(__MAPTASKS_ISSET_ID); + } + + public void setMapTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value); + } + + public int getReduceTasks() { + return this.reduceTasks; + } + + public void setReduceTasks(int reduceTasks) { + this.reduceTasks = reduceTasks; + setReduceTasksIsSet(true); + } + + public void unsetReduceTasks() { + __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID); + } + + /** Returns true if field reduceTasks is set (has been asigned a value) and false otherwise */ + public boolean isSetReduceTasks() { + return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID); + } + + public void setReduceTasksIsSet(boolean value) { + __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value); + } + + public int getMaxMapTasks() { + return this.maxMapTasks; + } + + public void setMaxMapTasks(int maxMapTasks) { + this.maxMapTasks = maxMapTasks; + setMaxMapTasksIsSet(true); + } + + public void unsetMaxMapTasks() { + __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID); + } + + /** Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise */ + public boolean isSetMaxMapTasks() { + return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID); + } + + public void setMaxMapTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value); + } + + public int getMaxReduceTasks() { + return this.maxReduceTasks; + } + + public void setMaxReduceTasks(int maxReduceTasks) { + this.maxReduceTasks = maxReduceTasks; + setMaxReduceTasksIsSet(true); + } + + public void unsetMaxReduceTasks() { + __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID); + } + + /** Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise */ + public boolean isSetMaxReduceTasks() { + return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID); + } + + public void setMaxReduceTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); + } + + /** + * + * @see JobTrackerState + */ + public JobTrackerState getState() { + return this.state; + } + + /** + * + * @see JobTrackerState + */ + public void setState(JobTrackerState state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been asigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + 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 { + setTaskTrackers((Integer)value); + } + break; + + case MAP_TASKS: + if (value == null) { + unsetMapTasks(); + } else { + setMapTasks((Integer)value); + } + break; + + case REDUCE_TASKS: + if (value == null) { + unsetReduceTasks(); + } else { + setReduceTasks((Integer)value); + } + break; + + case MAX_MAP_TASKS: + if (value == null) { + unsetMaxMapTasks(); + } else { + setMaxMapTasks((Integer)value); + } + break; + + case MAX_REDUCE_TASKS: + if (value == null) { + unsetMaxReduceTasks(); + } else { + setMaxReduceTasks((Integer)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((JobTrackerState)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TASK_TRACKERS: + return new Integer(getTaskTrackers()); + + case MAP_TASKS: + return new Integer(getMapTasks()); + + case REDUCE_TASKS: + return new Integer(getReduceTasks()); + + case MAX_MAP_TASKS: + return new Integer(getMaxMapTasks()); + + case MAX_REDUCE_TASKS: + return new Integer(getMaxReduceTasks()); + + case STATE: + return getState(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TASK_TRACKERS: + return isSetTaskTrackers(); + case MAP_TASKS: + return isSetMapTasks(); + case REDUCE_TASKS: + return isSetReduceTasks(); + case MAX_MAP_TASKS: + return isSetMaxMapTasks(); + case MAX_REDUCE_TASKS: + return isSetMaxReduceTasks(); + case STATE: + return isSetState(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveClusterStatus) + return this.equals((HiveClusterStatus)that); + return false; + } + + public boolean equals(HiveClusterStatus that) { + if (that == null) + return false; + + boolean this_present_taskTrackers = true; + boolean that_present_taskTrackers = true; + if (this_present_taskTrackers || that_present_taskTrackers) { + if (!(this_present_taskTrackers && that_present_taskTrackers)) + return false; + if (this.taskTrackers != that.taskTrackers) + return false; + } + + boolean this_present_mapTasks = true; + boolean that_present_mapTasks = true; + if (this_present_mapTasks || that_present_mapTasks) { + if (!(this_present_mapTasks && that_present_mapTasks)) + return false; + if (this.mapTasks != that.mapTasks) + return false; + } + + boolean this_present_reduceTasks = true; + boolean that_present_reduceTasks = true; + if (this_present_reduceTasks || that_present_reduceTasks) { + if (!(this_present_reduceTasks && that_present_reduceTasks)) + return false; + if (this.reduceTasks != that.reduceTasks) + return false; + } + + boolean this_present_maxMapTasks = true; + boolean that_present_maxMapTasks = true; + if (this_present_maxMapTasks || that_present_maxMapTasks) { + if (!(this_present_maxMapTasks && that_present_maxMapTasks)) + return false; + if (this.maxMapTasks != that.maxMapTasks) + return false; + } + + boolean this_present_maxReduceTasks = true; + boolean that_present_maxReduceTasks = true; + if (this_present_maxReduceTasks || that_present_maxReduceTasks) { + if (!(this_present_maxReduceTasks && that_present_maxReduceTasks)) + return false; + if (this.maxReduceTasks != that.maxReduceTasks) + return false; + } + + 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.equals(that.state)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(HiveClusterStatus other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveClusterStatus typedOther = (HiveClusterStatus)other; + + lastComparison = Boolean.valueOf(isSetTaskTrackers()).compareTo(typedOther.isSetTaskTrackers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskTrackers()) { + lastComparison = TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(typedOther.isSetMapTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMapTasks()) { + lastComparison = TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(typedOther.isSetReduceTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReduceTasks()) { + lastComparison = TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(typedOther.isSetMaxMapTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxMapTasks()) { + lastComparison = TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(typedOther.isSetMaxReduceTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxReduceTasks()) { + lastComparison = TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = TBaseHelper.compareTo(this.state, typedOther.state); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TASK_TRACKERS + if (field.type == TType.I32) { + this.taskTrackers = iprot.readI32(); + setTaskTrackersIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MAP_TASKS + if (field.type == TType.I32) { + this.mapTasks = iprot.readI32(); + setMapTasksIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // REDUCE_TASKS + if (field.type == TType.I32) { + this.reduceTasks = iprot.readI32(); + setReduceTasksIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // MAX_MAP_TASKS + if (field.type == TType.I32) { + this.maxMapTasks = iprot.readI32(); + setMaxMapTasksIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // MAX_REDUCE_TASKS + if (field.type == TType.I32) { + this.maxReduceTasks = iprot.readI32(); + setMaxReduceTasksIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // STATE + if (field.type == TType.I32) { + this.state = JobTrackerState.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); + oprot.writeI32(this.taskTrackers); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); + oprot.writeI32(this.mapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(this.reduceTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); + oprot.writeI32(this.maxMapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(this.maxReduceTasks); + oprot.writeFieldEnd(); + if (this.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(this.state.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("HiveClusterStatus("); + boolean first = true; + + sb.append("taskTrackers:"); + sb.append(this.taskTrackers); + first = false; + if (!first) sb.append(", "); + sb.append("mapTasks:"); + sb.append(this.mapTasks); + first = false; + if (!first) sb.append(", "); + sb.append("reduceTasks:"); + sb.append(this.reduceTasks); + first = false; + if (!first) sb.append(", "); + sb.append("maxMapTasks:"); + sb.append(this.maxMapTasks); + first = false; + if (!first) sb.append(", "); + sb.append("maxReduceTasks:"); + sb.append(this.maxReduceTasks); + first = false; + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java new file mode 100644 index 0000000..2935206 --- /dev/null +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java @@ -0,0 +1,480 @@ +/** + * 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.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class 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; + private int errorCode; + private String SQLState; + + /** 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; + } + } + + // 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))); + tmpMap.put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.SQLSTATE, new FieldMetaData("SQLState", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(HiveServerException.class, metaDataMap); + } + + public HiveServerException() { + } + + public HiveServerException( + String message, + int errorCode, + String SQLState) + { + this(); + this.message = message; + this.errorCode = errorCode; + setErrorCodeIsSet(true); + this.SQLState = SQLState; + } + + /** + * 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; + } + this.errorCode = other.errorCode; + if (other.isSetSQLState()) { + this.SQLState = other.SQLState; + } + } + + public HiveServerException deepCopy() { + return new HiveServerException(this); + } + + @Override + public void clear() { + this.message = null; + setErrorCodeIsSet(false); + this.errorCode = 0; + this.SQLState = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** 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; + setErrorCodeIsSet(true); + } + + public void unsetErrorCode() { + __isset_bit_vector.clear(__ERRORCODE_ISSET_ID); + } + + /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */ + public boolean isSetErrorCode() { + return __isset_bit_vector.get(__ERRORCODE_ISSET_ID); + } + + public void setErrorCodeIsSet(boolean value) { + __isset_bit_vector.set(__ERRORCODE_ISSET_ID, value); + } + + public String getSQLState() { + return this.SQLState; + } + + public void setSQLState(String SQLState) { + this.SQLState = SQLState; + } + + public void unsetSQLState() { + this.SQLState = null; + } + + /** Returns true if field SQLState is set (has been asigned a value) and false otherwise */ + public boolean isSetSQLState() { + return this.SQLState != null; + } + + 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(); + } else { + setMessage((String)value); + } + break; + + case ERROR_CODE: + if (value == null) { + unsetErrorCode(); + } else { + setErrorCode((Integer)value); + } + break; + + case SQLSTATE: + if (value == null) { + unsetSQLState(); + } else { + setSQLState((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + case ERROR_CODE: + return new Integer(getErrorCode()); + + case SQLSTATE: + return getSQLState(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + case ERROR_CODE: + return isSetErrorCode(); + case SQLSTATE: + return isSetSQLState(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveServerException) + return this.equals((HiveServerException)that); + return false; + } + + public boolean equals(HiveServerException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + boolean this_present_errorCode = true; + boolean that_present_errorCode = true; + if (this_present_errorCode || that_present_errorCode) { + if (!(this_present_errorCode && that_present_errorCode)) + return false; + if (this.errorCode != that.errorCode) + return false; + } + + boolean this_present_SQLState = true && this.isSetSQLState(); + boolean that_present_SQLState = true && that.isSetSQLState(); + if (this_present_SQLState || that_present_SQLState) { + if (!(this_present_SQLState && that_present_SQLState)) + return false; + if (!this.SQLState.equals(that.SQLState)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(HiveServerException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveServerException typedOther = (HiveServerException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorCode()) { + lastComparison = TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSQLState()).compareTo(typedOther.isSetSQLState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSQLState()) { + lastComparison = TBaseHelper.compareTo(this.SQLState, typedOther.SQLState); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ERROR_CODE + if (field.type == TType.I32) { + this.errorCode = iprot.readI32(); + setErrorCodeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // SQLSTATE + if (field.type == TType.STRING) { + this.SQLState = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(this.errorCode); + oprot.writeFieldEnd(); + if (this.SQLState != null) { + oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); + oprot.writeString(this.SQLState); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("HiveServerException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + if (!first) sb.append(", "); + sb.append("errorCode:"); + sb.append(this.errorCode); + first = false; + if (!first) sb.append(", "); + sb.append("SQLState:"); + if (this.SQLState == null) { + sb.append("null"); + } else { + sb.append(this.SQLState); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java new file mode 100644 index 0000000..d2cdabd --- /dev/null +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java @@ -0,0 +1,44 @@ +/** + * 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.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum JobTrackerState implements TEnum { + INITIALIZING(1), + RUNNING(2); + + private final int value; + + 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/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java new file mode 100644 index 0000000..a21dd8c --- /dev/null +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java @@ -0,0 +1,5556 @@ +/** + * 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.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class ThriftHive { + + public interface Iface extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface { + + public void execute(String query) throws HiveServerException, TException; + + public String fetchOne() throws HiveServerException, TException; + + public List fetchN(int numRows) throws HiveServerException, TException; + + public List fetchAll() throws HiveServerException, TException; + + public org.apache.hadoop.hive.metastore.api.Schema getSchema() throws HiveServerException, TException; + + public org.apache.hadoop.hive.metastore.api.Schema getThriftSchema() throws HiveServerException, TException; + + public HiveClusterStatus getClusterStatus() throws HiveServerException, TException; + + public org.apache.hadoop.hive.ql.plan.api.QueryPlan getQueryPlan() throws HiveServerException, TException; + + } + + 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); + } + + public Client(TProtocol iprot, TProtocol oprot) + { + super(iprot, oprot); + } + + public void execute(String query) throws HiveServerException, TException + { + send_execute(query); + recv_execute(); + } + + public void send_execute(String query) throws TException + { + oprot_.writeMessageBegin(new TMessage("execute", TMessageType.CALL, ++seqid_)); + execute_args args = new execute_args(); + args.setQuery(query); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public void recv_execute() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.ex != null) { + throw result.ex; + } + return; + } + + public String fetchOne() throws HiveServerException, TException + { + send_fetchOne(); + return recv_fetchOne(); + } + + public void send_fetchOne() throws TException + { + oprot_.writeMessageBegin(new TMessage("fetchOne", TMessageType.CALL, ++seqid_)); + fetchOne_args args = new fetchOne_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public String recv_fetchOne() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchOne failed: unknown result"); + } + + public List fetchN(int numRows) throws HiveServerException, TException + { + send_fetchN(numRows); + return recv_fetchN(); + } + + public void send_fetchN(int numRows) throws TException + { + oprot_.writeMessageBegin(new TMessage("fetchN", TMessageType.CALL, ++seqid_)); + fetchN_args args = new fetchN_args(); + args.setNumRows(numRows); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_fetchN() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchN failed: unknown result"); + } + + public List fetchAll() throws HiveServerException, TException + { + send_fetchAll(); + return recv_fetchAll(); + } + + public void send_fetchAll() throws TException + { + oprot_.writeMessageBegin(new TMessage("fetchAll", TMessageType.CALL, ++seqid_)); + fetchAll_args args = new fetchAll_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_fetchAll() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "fetchAll failed: unknown result"); + } + + public org.apache.hadoop.hive.metastore.api.Schema getSchema() throws HiveServerException, TException + { + send_getSchema(); + return recv_getSchema(); + } + + public void send_getSchema() throws TException + { + oprot_.writeMessageBegin(new TMessage("getSchema", TMessageType.CALL, ++seqid_)); + getSchema_args args = new getSchema_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public org.apache.hadoop.hive.metastore.api.Schema recv_getSchema() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSchema failed: unknown result"); + } + + public org.apache.hadoop.hive.metastore.api.Schema getThriftSchema() throws HiveServerException, TException + { + send_getThriftSchema(); + return recv_getThriftSchema(); + } + + public void send_getThriftSchema() throws TException + { + oprot_.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.CALL, ++seqid_)); + getThriftSchema_args args = new getThriftSchema_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public org.apache.hadoop.hive.metastore.api.Schema recv_getThriftSchema() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "getThriftSchema failed: unknown result"); + } + + public HiveClusterStatus getClusterStatus() throws HiveServerException, TException + { + send_getClusterStatus(); + return recv_getClusterStatus(); + } + + public void send_getClusterStatus() throws TException + { + oprot_.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.CALL, ++seqid_)); + getClusterStatus_args args = new getClusterStatus_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public HiveClusterStatus recv_getClusterStatus() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "getClusterStatus failed: unknown result"); + } + + public org.apache.hadoop.hive.ql.plan.api.QueryPlan getQueryPlan() throws HiveServerException, TException + { + send_getQueryPlan(); + return recv_getQueryPlan(); + } + + public void send_getQueryPlan() throws TException + { + oprot_.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.CALL, ++seqid_)); + getQueryPlan_args args = new getQueryPlan_args(); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public org.apache.hadoop.hive.ql.plan.api.QueryPlan recv_getQueryPlan() throws HiveServerException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + 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(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex != null) { + throw result.ex; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "getQueryPlan failed: unknown result"); + } + + } + 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 = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(Iface iface) + { + super(iface); + iface_ = iface; + processMap_.put("execute", new execute()); + processMap_.put("fetchOne", new fetchOne()); + processMap_.put("fetchN", new fetchN()); + processMap_.put("fetchAll", new fetchAll()); + processMap_.put("getSchema", new getSchema()); + processMap_.put("getThriftSchema", new getThriftSchema()); + processMap_.put("getClusterStatus", new getClusterStatus()); + processMap_.put("getQueryPlan", new getQueryPlan()); + } + + 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 execute implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + execute_args args = new execute_args(); + 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 { + iface_.execute(args.query); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing execute", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing execute"); + oprot.writeMessageBegin(new TMessage("execute", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("execute", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class fetchOne implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + fetchOne_args args = new fetchOne_args(); + 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 { + result.success = iface_.fetchOne(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing fetchOne", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchOne"); + oprot.writeMessageBegin(new TMessage("fetchOne", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("fetchOne", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class fetchN implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + fetchN_args args = new fetchN_args(); + 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 { + result.success = iface_.fetchN(args.numRows); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing fetchN", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchN"); + oprot.writeMessageBegin(new TMessage("fetchN", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("fetchN", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class fetchAll implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + fetchAll_args args = new fetchAll_args(); + 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 { + result.success = iface_.fetchAll(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing fetchAll", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing fetchAll"); + oprot.writeMessageBegin(new TMessage("fetchAll", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("fetchAll", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class getSchema implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + getSchema_args args = new getSchema_args(); + 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 { + result.success = iface_.getSchema(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing getSchema", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSchema"); + oprot.writeMessageBegin(new TMessage("getSchema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("getSchema", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class getThriftSchema implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + getThriftSchema_args args = new getThriftSchema_args(); + 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 { + result.success = iface_.getThriftSchema(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing getThriftSchema", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getThriftSchema"); + oprot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class getClusterStatus implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + getClusterStatus_args args = new getClusterStatus_args(); + 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 { + result.success = iface_.getClusterStatus(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing getClusterStatus", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getClusterStatus"); + oprot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class getQueryPlan implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + getQueryPlan_args args = new getQueryPlan_args(); + 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 { + result.success = iface_.getQueryPlan(); + } catch (HiveServerException ex) { + result.ex = ex; + } catch (Throwable th) { + LOGGER.error("Internal error processing getQueryPlan", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getQueryPlan"); + oprot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public execute_args() { + } + + public execute_args( + String query) + { + this(); + this.query = query; + } + + /** + * Performs a deep copy on other. + */ + public execute_args(execute_args other) { + if (other.isSetQuery()) { + this.query = other.query; + } + } + + public execute_args deepCopy() { + return new execute_args(this); + } + + @Override + public void clear() { + this.query = null; + } + + public String getQuery() { + return this.query; + } + + public void setQuery(String query) { + this.query = query; + } + + public void unsetQuery() { + this.query = null; + } + + /** Returns true if field query is set (has been asigned a value) and false otherwise */ + public boolean isSetQuery() { + return this.query != null; + } + + 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(); + } else { + setQuery((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case QUERY: + return getQuery(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case QUERY: + return isSetQuery(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof execute_args) + return this.equals((execute_args)that); + return false; + } + + public boolean equals(execute_args that) { + if (that == null) + return false; + + boolean this_present_query = true && this.isSetQuery(); + boolean that_present_query = true && that.isSetQuery(); + if (this_present_query || that_present_query) { + if (!(this_present_query && that_present_query)) + return false; + if (!this.query.equals(that.query)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(execute_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + execute_args typedOther = (execute_args)other; + + lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQuery()) { + lastComparison = TBaseHelper.compareTo(this.query, typedOther.query); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // QUERY + if (field.type == TType.STRING) { + this.query = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.query != null) { + oprot.writeFieldBegin(QUERY_FIELD_DESC); + oprot.writeString(this.query); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("execute_args("); + boolean first = true; + + sb.append("query:"); + if (this.query == null) { + sb.append("null"); + } else { + sb.append(this.query); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public execute_result() { + } + + public execute_result( + HiveServerException ex) + { + this(); + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public execute_result(execute_result other) { + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public execute_result deepCopy() { + return new execute_result(this); + } + + @Override + public void clear() { + this.ex = null; + } + + public HiveServerException getEx() { + return this.ex; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof execute_result) + return this.equals((execute_result)that); + return false; + } + + public boolean equals(execute_result that) { + if (that == null) + return false; + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(execute_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + execute_result typedOther = (execute_result)other; + + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("execute_result("); + boolean first = true; + + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + 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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(fetchOne_args.class, metaDataMap); + } + + public fetchOne_args() { + } + + /** + * Performs a deep copy on other. + */ + public fetchOne_args(fetchOne_args other) { + } + + public fetchOne_args deepCopy() { + return new fetchOne_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchOne_args) + return this.equals((fetchOne_args)that); + return false; + } + + public boolean equals(fetchOne_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchOne_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchOne_args typedOther = (fetchOne_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchOne_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public fetchOne_result() { + } + + public fetchOne_result( + String success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public fetchOne_result(fetchOne_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public fetchOne_result deepCopy() { + return new fetchOne_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((String)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchOne_result) + return this.equals((fetchOne_result)that); + return false; + } + + public boolean equals(fetchOne_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchOne_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchOne_result typedOther = (fetchOne_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRING) { + this.success = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchOne_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + + /** 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; + } + } + + // 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); + } + + public fetchN_args() { + } + + public fetchN_args( + int numRows) + { + this(); + this.numRows = numRows; + setNumRowsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public fetchN_args(fetchN_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.numRows = other.numRows; + } + + public fetchN_args deepCopy() { + return new fetchN_args(this); + } + + @Override + public void clear() { + setNumRowsIsSet(false); + this.numRows = 0; + } + + public int getNumRows() { + return this.numRows; + } + + public void setNumRows(int numRows) { + this.numRows = numRows; + setNumRowsIsSet(true); + } + + public void unsetNumRows() { + __isset_bit_vector.clear(__NUMROWS_ISSET_ID); + } + + /** Returns true if field numRows is set (has been asigned a value) and false otherwise */ + public boolean isSetNumRows() { + return __isset_bit_vector.get(__NUMROWS_ISSET_ID); + } + + 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 { + setNumRows((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUM_ROWS: + return new Integer(getNumRows()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUM_ROWS: + return isSetNumRows(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchN_args) + return this.equals((fetchN_args)that); + return false; + } + + public boolean equals(fetchN_args that) { + if (that == null) + return false; + + boolean this_present_numRows = true; + boolean that_present_numRows = true; + if (this_present_numRows || that_present_numRows) { + if (!(this_present_numRows && that_present_numRows)) + return false; + if (this.numRows != that.numRows) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchN_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchN_args typedOther = (fetchN_args)other; + + lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(typedOther.isSetNumRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumRows()) { + lastComparison = TBaseHelper.compareTo(this.numRows, typedOther.numRows); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NUM_ROWS + if (field.type == TType.I32) { + this.numRows = iprot.readI32(); + setNumRowsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI32(this.numRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchN_args("); + boolean first = true; + + sb.append("numRows:"); + sb.append(this.numRows); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class fetchN_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("fetchN_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); + + private List success; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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)))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(fetchN_result.class, metaDataMap); + } + + public fetchN_result() { + } + + public fetchN_result( + List success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public fetchN_result(fetchN_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public fetchN_result deepCopy() { + return new fetchN_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((List)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchN_result) + return this.equals((fetchN_result)that); + return false; + } + + public boolean equals(fetchN_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchN_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchN_result typedOther = (fetchN_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.success = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; + _elem2 = iprot.readString(); + this.success.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter3 : this.success) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchN_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class fetchAll_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("fetchAll_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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _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); + } + + public fetchAll_args() { + } + + /** + * Performs a deep copy on other. + */ + public fetchAll_args(fetchAll_args other) { + } + + public fetchAll_args deepCopy() { + return new fetchAll_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchAll_args) + return this.equals((fetchAll_args)that); + return false; + } + + public boolean equals(fetchAll_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchAll_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchAll_args typedOther = (fetchAll_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchAll_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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)))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(fetchAll_result.class, metaDataMap); + } + + public fetchAll_result() { + } + + public fetchAll_result( + List success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public fetchAll_result(fetchAll_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public fetchAll_result deepCopy() { + return new fetchAll_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((List)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fetchAll_result) + return this.equals((fetchAll_result)that); + return false; + } + + public boolean equals(fetchAll_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(fetchAll_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchAll_result typedOther = (fetchAll_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list4 = iprot.readListBegin(); + this.success = new ArrayList(_list4.size); + for (int _i5 = 0; _i5 < _list4.size; ++_i5) + { + String _elem6; + _elem6 = iprot.readString(); + this.success.add(_elem6); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter7 : this.success) + { + oprot.writeString(_iter7); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("fetchAll_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class getSchema_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getSchema_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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _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); + } + + public getSchema_args() { + } + + /** + * Performs a deep copy on other. + */ + public getSchema_args(getSchema_args other) { + } + + public getSchema_args deepCopy() { + return new getSchema_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getSchema_args) + return this.equals((getSchema_args)that); + return false; + } + + public boolean equals(getSchema_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getSchema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getSchema_args typedOther = (getSchema_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getSchema_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public getSchema_result() { + } + + public getSchema_result( + org.apache.hadoop.hive.metastore.api.Schema success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public getSchema_result(getSchema_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.hadoop.hive.metastore.api.Schema(other.success); + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public getSchema_result deepCopy() { + return new getSchema_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { + return this.success; + } + + public void setSuccess(org.apache.hadoop.hive.metastore.api.Schema success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((org.apache.hadoop.hive.metastore.api.Schema)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getSchema_result) + return this.equals((getSchema_result)that); + return false; + } + + public boolean equals(getSchema_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getSchema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getSchema_result typedOther = (getSchema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getSchema_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class getThriftSchema_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getThriftSchema_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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _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); + } + + public getThriftSchema_args() { + } + + /** + * Performs a deep copy on other. + */ + public getThriftSchema_args(getThriftSchema_args other) { + } + + public getThriftSchema_args deepCopy() { + return new getThriftSchema_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getThriftSchema_args) + return this.equals((getThriftSchema_args)that); + return false; + } + + public boolean equals(getThriftSchema_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getThriftSchema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getThriftSchema_args typedOther = (getThriftSchema_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getThriftSchema_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public getThriftSchema_result() { + } + + public getThriftSchema_result( + org.apache.hadoop.hive.metastore.api.Schema success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public getThriftSchema_result(getThriftSchema_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.hadoop.hive.metastore.api.Schema(other.success); + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public getThriftSchema_result deepCopy() { + return new getThriftSchema_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { + return this.success; + } + + public void setSuccess(org.apache.hadoop.hive.metastore.api.Schema success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((org.apache.hadoop.hive.metastore.api.Schema)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getThriftSchema_result) + return this.equals((getThriftSchema_result)that); + return false; + } + + public boolean equals(getThriftSchema_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getThriftSchema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getThriftSchema_result typedOther = (getThriftSchema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getThriftSchema_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class getClusterStatus_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getClusterStatus_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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _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); + } + + public getClusterStatus_args() { + } + + /** + * Performs a deep copy on other. + */ + public getClusterStatus_args(getClusterStatus_args other) { + } + + public getClusterStatus_args deepCopy() { + return new getClusterStatus_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getClusterStatus_args) + return this.equals((getClusterStatus_args)that); + return false; + } + + public boolean equals(getClusterStatus_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getClusterStatus_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getClusterStatus_args typedOther = (getClusterStatus_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getClusterStatus_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public getClusterStatus_result() { + } + + public getClusterStatus_result( + HiveClusterStatus success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public getClusterStatus_result(getClusterStatus_result other) { + if (other.isSetSuccess()) { + this.success = new HiveClusterStatus(other.success); + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public getClusterStatus_result deepCopy() { + return new getClusterStatus_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public HiveClusterStatus getSuccess() { + return this.success; + } + + public void setSuccess(HiveClusterStatus success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((HiveClusterStatus)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getClusterStatus_result) + return this.equals((getClusterStatus_result)that); + return false; + } + + public boolean equals(getClusterStatus_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getClusterStatus_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getClusterStatus_result typedOther = (getClusterStatus_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new HiveClusterStatus(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getClusterStatus_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class getQueryPlan_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getQueryPlan_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; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _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); + } + + public getQueryPlan_args() { + } + + /** + * Performs a deep copy on other. + */ + public getQueryPlan_args(getQueryPlan_args other) { + } + + public getQueryPlan_args deepCopy() { + return new getQueryPlan_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getQueryPlan_args) + return this.equals((getQueryPlan_args)that); + return false; + } + + public boolean equals(getQueryPlan_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getQueryPlan_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getQueryPlan_args typedOther = (getQueryPlan_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getQueryPlan_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + 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; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, 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); + } + + public getQueryPlan_result() { + } + + public getQueryPlan_result( + org.apache.hadoop.hive.ql.plan.api.QueryPlan success, + HiveServerException ex) + { + this(); + this.success = success; + this.ex = ex; + } + + /** + * Performs a deep copy on other. + */ + public getQueryPlan_result(getQueryPlan_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(other.success); + } + if (other.isSetEx()) { + this.ex = new HiveServerException(other.ex); + } + } + + public getQueryPlan_result deepCopy() { + return new getQueryPlan_result(this); + } + + @Override + public void clear() { + this.success = null; + this.ex = null; + } + + public org.apache.hadoop.hive.ql.plan.api.QueryPlan getSuccess() { + return this.success; + } + + public void setSuccess(org.apache.hadoop.hive.ql.plan.api.QueryPlan success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** 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; + } + + public void setEx(HiveServerException ex) { + this.ex = ex; + } + + public void unsetEx() { + this.ex = null; + } + + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ + public boolean isSetEx() { + return this.ex != null; + } + + 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(); + } else { + setSuccess((org.apache.hadoop.hive.ql.plan.api.QueryPlan)value); + } + break; + + case EX: + if (value == null) { + unsetEx(); + } else { + setEx((HiveServerException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case EX: + return getEx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case EX: + return isSetEx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getQueryPlan_result) + return this.equals((getQueryPlan_result)that); + return false; + } + + public boolean equals(getQueryPlan_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_ex = true && this.isSetEx(); + boolean that_present_ex = true && that.isSetEx(); + if (this_present_ex || that_present_ex) { + if (!(this_present_ex && that_present_ex)) + return false; + if (!this.ex.equals(that.ex)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getQueryPlan_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getQueryPlan_result typedOther = (getQueryPlan_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + 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); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // EX + if (field.type == TType.STRUCT) { + this.ex = new HiveServerException(); + this.ex.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetEx()) { + oprot.writeFieldBegin(EX_FIELD_DESC); + this.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getQueryPlan_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("ex:"); + if (this.ex == null) { + sb.append("null"); + } else { + sb.append(this.ex); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + +} diff --git service/src/gen/thrift/gen-php/hive_service/ThriftHive.php service/src/gen/thrift/gen-php/hive_service/ThriftHive.php new file mode 100644 index 0000000..48d281a --- /dev/null +++ service/src/gen/thrift/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/thrift/gen-php/hive_service/hive_service_types.php service/src/gen/thrift/gen-php/hive_service/hive_service_types.php new file mode 100644 index 0000000..4ebe36e --- /dev/null +++ service/src/gen/thrift/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/thrift/gen-py/__init__.py service/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote new file mode 100755 index 0000000..b641989 --- /dev/null +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote @@ -0,0 +1,134 @@ +#!/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 ' Schema getSchema()' + print ' Schema getThriftSchema()' + print ' HiveClusterStatus getClusterStatus()' + print ' QueryPlan getQueryPlan()' + 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] + if url[4]: + uri += '?%s' % url[4] + 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()) + +elif cmd == 'getThriftSchema': + if len(args) != 0: + print 'getThriftSchema requires 0 args' + sys.exit(1) + pp.pprint(client.getThriftSchema()) + +elif cmd == 'getClusterStatus': + if len(args) != 0: + print 'getClusterStatus requires 0 args' + sys.exit(1) + pp.pprint(client.getClusterStatus()) + +elif cmd == 'getQueryPlan': + if len(args) != 0: + print 'getQueryPlan requires 0 args' + sys.exit(1) + pp.pprint(client.getQueryPlan()) + +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + +transport.close() diff --git service/src/gen/thrift/gen-py/hive_service/ThriftHive.py service/src/gen/thrift/gen-py/hive_service/ThriftHive.py new file mode 100644 index 0000000..9277ced --- /dev/null +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive.py @@ -0,0 +1,1363 @@ +# +# 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, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class Iface(hive_metastore.ThriftHiveMetastore.Iface): + def execute(self, query): + """ + Parameters: + - query + """ + pass + + def fetchOne(self, ): + pass + + def fetchN(self, numRows): + """ + Parameters: + - numRows + """ + pass + + def fetchAll(self, ): + pass + + def getSchema(self, ): + pass + + def getThriftSchema(self, ): + pass + + def getClusterStatus(self, ): + pass + + def getQueryPlan(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): + """ + Parameters: + - 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): + """ + Parameters: + - 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"); + + def getThriftSchema(self, ): + self.send_getThriftSchema() + return self.recv_getThriftSchema() + + def send_getThriftSchema(self, ): + self._oprot.writeMessageBegin('getThriftSchema', TMessageType.CALL, self._seqid) + args = getThriftSchema_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getThriftSchema(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getThriftSchema_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, "getThriftSchema failed: unknown result"); + + def getClusterStatus(self, ): + self.send_getClusterStatus() + return self.recv_getClusterStatus() + + def send_getClusterStatus(self, ): + self._oprot.writeMessageBegin('getClusterStatus', TMessageType.CALL, self._seqid) + args = getClusterStatus_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getClusterStatus(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getClusterStatus_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, "getClusterStatus failed: unknown result"); + + def getQueryPlan(self, ): + self.send_getQueryPlan() + return self.recv_getQueryPlan() + + def send_getQueryPlan(self, ): + self._oprot.writeMessageBegin('getQueryPlan', TMessageType.CALL, self._seqid) + args = getQueryPlan_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getQueryPlan(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getQueryPlan_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, "getQueryPlan 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 + self._processMap["getThriftSchema"] = Processor.process_getThriftSchema + self._processMap["getClusterStatus"] = Processor.process_getClusterStatus + self._processMap["getQueryPlan"] = Processor.process_getQueryPlan + + 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() + + def process_getThriftSchema(self, seqid, iprot, oprot): + args = getThriftSchema_args() + args.read(iprot) + iprot.readMessageEnd() + result = getThriftSchema_result() + try: + result.success = self._handler.getThriftSchema() + except HiveServerException, ex: + result.ex = ex + oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getClusterStatus(self, seqid, iprot, oprot): + args = getClusterStatus_args() + args.read(iprot) + iprot.readMessageEnd() + result = getClusterStatus_result() + try: + result.success = self._handler.getClusterStatus() + except HiveServerException, ex: + result.ex = ex + oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getQueryPlan(self, seqid, iprot, oprot): + args = getQueryPlan_args() + args.read(iprot) + iprot.readMessageEnd() + result = getQueryPlan_result() + try: + result.success = self._handler.getQueryPlan() + except HiveServerException, ex: + result.ex = ex + oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class execute_args: + """ + Attributes: + - query + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'query', None, None, ), # 1 + ) + + def __init__(self, query=None,): + self.query = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class execute_result: + """ + Attributes: + - ex + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, ex=None,): + self.ex = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchOne_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('fetchOne_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchOne_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchN_args: + """ + Attributes: + - numRows + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'numRows', None, None, ), # 1 + ) + + def __init__(self, numRows=None,): + self.numRows = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchN_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchAll_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('fetchAll_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fetchAll_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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 validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getSchema_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getSchema_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getSchema_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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.STRUCT: + self.success = hive_metastore.ttypes.Schema() + self.success.read(iprot) + 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.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ex != None: + oprot.writeFieldBegin('ex', TType.STRUCT, 1) + self.ex.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getThriftSchema_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getThriftSchema_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getThriftSchema_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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.STRUCT: + self.success = hive_metastore.ttypes.Schema() + self.success.read(iprot) + 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('getThriftSchema_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ex != None: + oprot.writeFieldBegin('ex', TType.STRUCT, 1) + self.ex.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getClusterStatus_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getClusterStatus_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getClusterStatus_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (HiveClusterStatus, HiveClusterStatus.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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.STRUCT: + self.success = HiveClusterStatus() + self.success.read(iprot) + 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('getClusterStatus_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ex != None: + oprot.writeFieldBegin('ex', TType.STRUCT, 1) + self.ex.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getQueryPlan_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getQueryPlan_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getQueryPlan_result: + """ + Attributes: + - success + - ex + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (queryplan.ttypes.QueryPlan, queryplan.ttypes.QueryPlan.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, ex=None,): + self.success = success + self.ex = 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.STRUCT: + self.success = queryplan.ttypes.QueryPlan() + self.success.read(iprot) + 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('getQueryPlan_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ex != None: + oprot.writeFieldBegin('ex', TType.STRUCT, 1) + self.ex.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git service/src/gen/thrift/gen-py/hive_service/__init__.py service/src/gen/thrift/gen-py/hive_service/__init__.py new file mode 100644 index 0000000..6a0dcc9 --- /dev/null +++ service/src/gen/thrift/gen-py/hive_service/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants', 'ThriftHive'] diff --git service/src/gen/thrift/gen-py/hive_service/constants.py service/src/gen/thrift/gen-py/hive_service/constants.py new file mode 100644 index 0000000..2f17ec3 --- /dev/null +++ service/src/gen/thrift/gen-py/hive_service/constants.py @@ -0,0 +1,9 @@ +# +# 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/thrift/gen-py/hive_service/ttypes.py service/src/gen/thrift/gen-py/hive_service/ttypes.py new file mode 100644 index 0000000..467f812 --- /dev/null +++ service/src/gen/thrift/gen-py/hive_service/ttypes.py @@ -0,0 +1,239 @@ +# +# 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 +import queryplan.ttypes + + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class JobTrackerState: + INITIALIZING = 1 + RUNNING = 2 + + _VALUES_TO_NAMES = { + 1: "INITIALIZING", + 2: "RUNNING", + } + + _NAMES_TO_VALUES = { + "INITIALIZING": 1, + "RUNNING": 2, + } + + +class HiveClusterStatus: + """ + Attributes: + - taskTrackers + - mapTasks + - reduceTasks + - maxMapTasks + - maxReduceTasks + - state + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'taskTrackers', None, None, ), # 1 + (2, TType.I32, 'mapTasks', None, None, ), # 2 + (3, TType.I32, 'reduceTasks', None, None, ), # 3 + (4, TType.I32, 'maxMapTasks', None, None, ), # 4 + (5, TType.I32, 'maxReduceTasks', None, None, ), # 5 + (6, TType.I32, 'state', None, None, ), # 6 + ) + + def __init__(self, taskTrackers=None, mapTasks=None, reduceTasks=None, maxMapTasks=None, maxReduceTasks=None, state=None,): + self.taskTrackers = taskTrackers + self.mapTasks = mapTasks + self.reduceTasks = reduceTasks + self.maxMapTasks = maxMapTasks + self.maxReduceTasks = maxReduceTasks + self.state = state + + 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.taskTrackers = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.mapTasks = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.reduceTasks = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.maxMapTasks = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.maxReduceTasks = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.state = 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('HiveClusterStatus') + if self.taskTrackers != None: + oprot.writeFieldBegin('taskTrackers', TType.I32, 1) + oprot.writeI32(self.taskTrackers) + oprot.writeFieldEnd() + if self.mapTasks != None: + oprot.writeFieldBegin('mapTasks', TType.I32, 2) + oprot.writeI32(self.mapTasks) + oprot.writeFieldEnd() + if self.reduceTasks != None: + oprot.writeFieldBegin('reduceTasks', TType.I32, 3) + oprot.writeI32(self.reduceTasks) + oprot.writeFieldEnd() + if self.maxMapTasks != None: + oprot.writeFieldBegin('maxMapTasks', TType.I32, 4) + oprot.writeI32(self.maxMapTasks) + oprot.writeFieldEnd() + if self.maxReduceTasks != None: + oprot.writeFieldBegin('maxReduceTasks', TType.I32, 5) + oprot.writeI32(self.maxReduceTasks) + oprot.writeFieldEnd() + if self.state != None: + oprot.writeFieldBegin('state', TType.I32, 6) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HiveServerException(Exception): + """ + Attributes: + - message + - errorCode + - SQLState + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + (2, TType.I32, 'errorCode', None, None, ), # 2 + (3, TType.STRING, 'SQLState', None, None, ), # 3 + ) + + def __init__(self, message=None, errorCode=None, SQLState=None,): + self.message = message + self.errorCode = errorCode + self.SQLState = SQLState + + 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) + elif fid == 2: + if ftype == TType.I32: + self.errorCode = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.SQLState = 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() + if self.errorCode != None: + oprot.writeFieldBegin('errorCode', TType.I32, 2) + oprot.writeI32(self.errorCode) + oprot.writeFieldEnd() + if self.SQLState != None: + oprot.writeFieldBegin('SQLState', TType.STRING, 3) + oprot.writeString(self.SQLState) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git service/src/gen/thrift/gen-rb/hive_service_constants.rb service/src/gen/thrift/gen-rb/hive_service_constants.rb new file mode 100644 index 0000000..730f6cc --- /dev/null +++ service/src/gen/thrift/gen-rb/hive_service_constants.rb @@ -0,0 +1,8 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'hive_service_types' + diff --git service/src/gen/thrift/gen-rb/hive_service_types.rb service/src/gen/thrift/gen-rb/hive_service_types.rb new file mode 100644 index 0000000..6102824 --- /dev/null +++ service/src/gen/thrift/gen-rb/hive_service_types.rb @@ -0,0 +1,67 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'fb303_types' +require 'hive_metastore_types' +require 'queryplan_types' + + +module JobTrackerState + INITIALIZING = 1 + RUNNING = 2 + VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"} + VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze +end + +class HiveClusterStatus + include ::Thrift::Struct, ::Thrift::Struct_Union + TASKTRACKERS = 1 + MAPTASKS = 2 + REDUCETASKS = 3 + MAXMAPTASKS = 4 + MAXREDUCETASKS = 5 + STATE = 6 + + FIELDS = { + TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'}, + MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'}, + REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'}, + MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'}, + MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'}, + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState} + } + + def struct_fields; FIELDS; end + + def validate + unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class HiveServerException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + MESSAGE = 1 + ERRORCODE = 2 + SQLSTATE = 3 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}, + ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode'}, + SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'SQLState'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git service/src/gen/thrift/gen-rb/thrift_hive.rb service/src/gen/thrift/gen-rb/thrift_hive.rb new file mode 100644 index 0000000..926f643 --- /dev/null +++ service/src/gen/thrift/gen-rb/thrift_hive.rb @@ -0,0 +1,504 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'thrift_hive_metastore' +require 'hive_service_types' + +module ThriftHive + class Client < ThriftHiveMetastore::Client + include ::Thrift::Client + + def execute(query) + send_execute(query) + recv_execute() + end + + def send_execute(query) + send_message('execute', Execute_args, :query => query) + end + + def recv_execute() + result = receive_message(Execute_result) + raise result.ex unless result.ex.nil? + return + end + + def fetchOne() + send_fetchOne() + return recv_fetchOne() + end + + def send_fetchOne() + send_message('fetchOne', FetchOne_args) + end + + def recv_fetchOne() + result = receive_message(FetchOne_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result') + end + + def fetchN(numRows) + send_fetchN(numRows) + return recv_fetchN() + end + + def send_fetchN(numRows) + send_message('fetchN', FetchN_args, :numRows => numRows) + end + + def recv_fetchN() + result = receive_message(FetchN_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result') + end + + def fetchAll() + send_fetchAll() + return recv_fetchAll() + end + + def send_fetchAll() + send_message('fetchAll', FetchAll_args) + end + + def recv_fetchAll() + result = receive_message(FetchAll_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result') + end + + def getSchema() + send_getSchema() + return recv_getSchema() + end + + def send_getSchema() + send_message('getSchema', GetSchema_args) + end + + def recv_getSchema() + result = receive_message(GetSchema_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result') + end + + def getThriftSchema() + send_getThriftSchema() + return recv_getThriftSchema() + end + + def send_getThriftSchema() + send_message('getThriftSchema', GetThriftSchema_args) + end + + def recv_getThriftSchema() + result = receive_message(GetThriftSchema_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result') + end + + def getClusterStatus() + send_getClusterStatus() + return recv_getClusterStatus() + end + + def send_getClusterStatus() + send_message('getClusterStatus', GetClusterStatus_args) + end + + def recv_getClusterStatus() + result = receive_message(GetClusterStatus_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result') + end + + def getQueryPlan() + send_getQueryPlan() + return recv_getQueryPlan() + end + + def send_getQueryPlan() + send_message('getQueryPlan', GetQueryPlan_args) + end + + def recv_getQueryPlan() + result = receive_message(GetQueryPlan_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result') + end + + end + + class Processor < ThriftHiveMetastore::Processor + include ::Thrift::Processor + + def process_execute(seqid, iprot, oprot) + args = read_args(iprot, Execute_args) + result = Execute_result.new() + begin + @handler.execute(args.query) + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'execute', seqid) + end + + def process_fetchOne(seqid, iprot, oprot) + args = read_args(iprot, FetchOne_args) + result = FetchOne_result.new() + begin + result.success = @handler.fetchOne() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchOne', seqid) + end + + def process_fetchN(seqid, iprot, oprot) + args = read_args(iprot, FetchN_args) + result = FetchN_result.new() + begin + result.success = @handler.fetchN(args.numRows) + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchN', seqid) + end + + def process_fetchAll(seqid, iprot, oprot) + args = read_args(iprot, FetchAll_args) + result = FetchAll_result.new() + begin + result.success = @handler.fetchAll() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchAll', seqid) + end + + def process_getSchema(seqid, iprot, oprot) + args = read_args(iprot, GetSchema_args) + result = GetSchema_result.new() + begin + result.success = @handler.getSchema() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getSchema', seqid) + end + + def process_getThriftSchema(seqid, iprot, oprot) + args = read_args(iprot, GetThriftSchema_args) + result = GetThriftSchema_result.new() + begin + result.success = @handler.getThriftSchema() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getThriftSchema', seqid) + end + + def process_getClusterStatus(seqid, iprot, oprot) + args = read_args(iprot, GetClusterStatus_args) + result = GetClusterStatus_result.new() + begin + result.success = @handler.getClusterStatus() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getClusterStatus', seqid) + end + + def process_getQueryPlan(seqid, iprot, oprot) + args = read_args(iprot, GetQueryPlan_args) + result = GetQueryPlan_result.new() + begin + result.success = @handler.getQueryPlan() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getQueryPlan', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class Execute_args + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERY = 1 + + FIELDS = { + QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Execute_result + include ::Thrift::Struct, ::Thrift::Struct_Union + EX = 1 + + FIELDS = { + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchOne_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchOne_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchN_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NUMROWS = 1 + + FIELDS = { + NUMROWS => {:type => ::Thrift::Types::I32, :name => 'numRows'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchN_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchAll_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchAll_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetSchema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetSchema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetThriftSchema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetThriftSchema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetClusterStatus_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetClusterStatus_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetQueryPlan_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetQueryPlan_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end + diff --git service/src/java/org/apache/hadoop/hive/service/HiveServer.java service/src/java/org/apache/hadoop/hive/service/HiveServer.java index 89cf336..b7a2687 100644 --- service/src/java/org/apache/hadoop/hive/service/HiveServer.java +++ service/src/java/org/apache/hadoop/hive/service/HiveServer.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import com.facebook.fb303.fb_status; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; @@ -145,7 +146,7 @@ public class HiveServer extends ThriftHive { JobTracker.State jbs = cs.getJobTrackerState(); // Convert the ClusterStatus to its Thrift equivalent: HiveClusterStatus - int state; + JobTrackerState state; switch (jbs) { case INITIALIZING: state = JobTrackerState.INITIALIZING; @@ -321,8 +322,8 @@ public class HiveServer extends ThriftHive { * Return the status of the server. */ @Override - public int getStatus() { - return 0; + public fb_status getStatus() { + return fb_status.ALIVE; } /**