diff --git bin/ext/hiveserver.cmd bin/ext/hiveserver.cmd
deleted file mode 100644
index 1f0e717..0000000
--- bin/ext/hiveserver.cmd
+++ /dev/null
@@ -1,48 +0,0 @@
-@echo off
-@rem Licensed to the Apache Software Foundation (ASF) under one or more
-@rem contributor license agreements. See the NOTICE file distributed with
-@rem this work for additional information regarding copyright ownership.
-@rem The ASF licenses this file to You under the Apache License, Version 2.0
-@rem (the "License"); you may not use this file except in compliance with
-@rem the License. You may obtain a copy of the License at
-@rem
-@rem http://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-
-set CLASS=org.apache.hadoop.hive.service.HiveServer
-pushd %HIVE_LIB%
-for /f %%a IN ('dir /b hive-service-*.jar') do (
- set JAR=%HIVE_LIB%\%%a
-)
-popd
-
-if [%1]==[hiveserver_help] goto :hiveserver_help
-
-if [%1]==[hiveserver_catservice] goto :hiveserver_catservice
-
-:hiveserver
- echo "Starting Hive Thrift Server"
-
- @rem hadoop 20 or newer - skip the aux_jars option and hiveconf
- call %HIVE_BIN_PATH%\ext\util\execHiveCmd.cmd %CLASS%
-goto :EOF
-
-:hiveserver_help
- set HIVEARGS=-h
- goto :hiveserver
-goto :EOF
-
-:hiveserver_catservice
-@echo ^
-@echo ^HiveServer^
-@echo ^HiveServer^
-@echo ^Hadoop HiveServer Service^
-@echo ^%JAVA_HOME%\bin\java^
-@echo ^%JAVA_HEAP_MAX% %HADOOP_OPTS% %AUX_PARAM% -classpath %CLASSPATH% %CLASS% -hiveconf hive.hadoop.classpath=%HIVE_LIB%\* %HIVE_OPTS%^
-@echo ^
-goto :EOF
diff --git bin/ext/hiveserver.sh bin/ext/hiveserver.sh
deleted file mode 100644
index 7335b83..0000000
--- bin/ext/hiveserver.sh
+++ /dev/null
@@ -1,35 +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.
-
-THISSERVICE=hiveserver
-export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} "
-
-hiveserver() {
- echo "Starting Hive Thrift Server"
- CLASS=org.apache.hadoop.hive.service.HiveServer
- if $cygwin; then
- HIVE_LIB=`cygpath -w "$HIVE_LIB"`
- fi
- JAR=${HIVE_LIB}/hive-service-*.jar
-
- # hadoop 20 or newer - skip the aux_jars option and hiveconf
-
- exec $HADOOP jar $JAR $CLASS $HIVE_OPTS "$@"
-}
-
-hiveserver_help() {
- hiveserver -h
-}
-
diff --git service/if/hive_service.thrift service/if/hive_service.thrift
deleted file mode 100644
index 8f007bc..0000000
--- service/if/hive_service.thrift
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/local/bin/thrift -java
-
-# 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.
-
-#
-# Thrift Service that the hive service is built on
-#
-
-#
-# TODO: include/thrift is shared among different components. It
-# should not be under metastore.
-
-include "share/fb303/if/fb303.thrift"
-include "metastore/if/hive_metastore.thrift"
-include "ql/if/queryplan.thrift"
-
-namespace java org.apache.hadoop.hive.service
-namespace cpp Apache.Hadoop.Hive
-
-// Enumeration of JobTracker.State
-enum JobTrackerState {
- INITIALIZING = 1,
- RUNNING = 2,
-}
-
-// Map-Reduce cluster status information
-struct HiveClusterStatus {
- 1: i32 taskTrackers,
- 2: i32 mapTasks,
- 3: i32 reduceTasks,
- 4: i32 maxMapTasks,
- 5: i32 maxReduceTasks,
- 6: JobTrackerState state,
-}
-
-exception HiveServerException {
- 1: string message
- 2: i32 errorCode
- 3: string SQLState
-}
-
-# Interface for Thrift Hive Server
-service ThriftHive extends hive_metastore.ThriftHiveMetastore {
- # Execute a query. Takes a HiveQL string
- void execute(1:string query) throws(1:HiveServerException ex)
-
- # Fetch one row. This row is the serialized form
- # of the result of the query
- string fetchOne() throws(1:HiveServerException ex)
-
- # Fetch a given number of rows or remaining number of
- # rows whichever is smaller.
- list fetchN(1:i32 numRows) throws(1:HiveServerException ex)
-
- # Fetch all rows of the query result
- list fetchAll() throws(1:HiveServerException ex)
-
- # Get a schema object with fields represented with native Hive types
- hive_metastore.Schema getSchema() throws(1:HiveServerException ex)
-
- # Get a schema object with fields represented with Thrift DDL types
- hive_metastore.Schema getThriftSchema() throws(1:HiveServerException ex)
-
- # Get the status information about the Map-Reduce cluster
- HiveClusterStatus getClusterStatus() throws(1:HiveServerException ex)
-
- # Get the queryplan annotated with counter information
- queryplan.QueryPlan getQueryPlan() throws(1:HiveServerException ex)
-
- # clean up last Hive query (releasing locks etc.)
- void clean()
-}
diff --git service/src/gen/thrift/gen-cpp/ThriftHive.cpp service/src/gen/thrift/gen-cpp/ThriftHive.cpp
deleted file mode 100644
index a5448f0..0000000
--- service/src/gen/thrift/gen-cpp/ThriftHive.cpp
+++ /dev/null
@@ -1,3544 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#include "ThriftHive.h"
-
-namespace Apache { namespace Hadoop { namespace Hive {
-
-
-ThriftHive_execute_args::~ThriftHive_execute_args() throw() {
-}
-
-
-uint32_t ThriftHive_execute_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-
-ThriftHive_execute_pargs::~ThriftHive_execute_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_execute_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-
-ThriftHive_execute_result::~ThriftHive_execute_result() throw() {
-}
-
-
-uint32_t ThriftHive_execute_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_execute_presult::~ThriftHive_execute_presult() throw() {
-}
-
-
-uint32_t ThriftHive_execute_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_fetchOne_args::~ThriftHive_fetchOne_args() throw() {
-}
-
-
-uint32_t ThriftHive_fetchOne_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_fetchOne_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_fetchOne_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_fetchOne_pargs::~ThriftHive_fetchOne_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_fetchOne_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_fetchOne_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_fetchOne_result::~ThriftHive_fetchOne_result() throw() {
-}
-
-
-uint32_t ThriftHive_fetchOne_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_fetchOne_presult::~ThriftHive_fetchOne_presult() throw() {
-}
-
-
-uint32_t ThriftHive_fetchOne_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_fetchN_args::~ThriftHive_fetchN_args() throw() {
-}
-
-
-uint32_t ThriftHive_fetchN_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-
-ThriftHive_fetchN_pargs::~ThriftHive_fetchN_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_fetchN_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-
-ThriftHive_fetchN_result::~ThriftHive_fetchN_result() throw() {
-}
-
-
-uint32_t ThriftHive_fetchN_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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 _size5;
- ::apache::thrift::protocol::TType _etype8;
- xfer += iprot->readListBegin(_etype8, _size5);
- this->success.resize(_size5);
- uint32_t _i9;
- for (_i9 = 0; _i9 < _size5; ++_i9)
- {
- xfer += iprot->readString(this->success[_i9]);
- }
- xfer += 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, static_cast(this->success.size()));
- std::vector ::const_iterator _iter10;
- for (_iter10 = this->success.begin(); _iter10 != this->success.end(); ++_iter10)
- {
- xfer += oprot->writeString((*_iter10));
- }
- 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;
-}
-
-
-ThriftHive_fetchN_presult::~ThriftHive_fetchN_presult() throw() {
-}
-
-
-uint32_t ThriftHive_fetchN_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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 _size11;
- ::apache::thrift::protocol::TType _etype14;
- xfer += iprot->readListBegin(_etype14, _size11);
- (*(this->success)).resize(_size11);
- uint32_t _i15;
- for (_i15 = 0; _i15 < _size11; ++_i15)
- {
- xfer += iprot->readString((*(this->success))[_i15]);
- }
- xfer += 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;
-}
-
-
-ThriftHive_fetchAll_args::~ThriftHive_fetchAll_args() throw() {
-}
-
-
-uint32_t ThriftHive_fetchAll_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_fetchAll_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_fetchAll_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_fetchAll_pargs::~ThriftHive_fetchAll_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_fetchAll_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_fetchAll_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_fetchAll_result::~ThriftHive_fetchAll_result() throw() {
-}
-
-
-uint32_t ThriftHive_fetchAll_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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 _size16;
- ::apache::thrift::protocol::TType _etype19;
- xfer += iprot->readListBegin(_etype19, _size16);
- this->success.resize(_size16);
- uint32_t _i20;
- for (_i20 = 0; _i20 < _size16; ++_i20)
- {
- xfer += iprot->readString(this->success[_i20]);
- }
- xfer += 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, static_cast(this->success.size()));
- std::vector ::const_iterator _iter21;
- for (_iter21 = this->success.begin(); _iter21 != this->success.end(); ++_iter21)
- {
- xfer += oprot->writeString((*_iter21));
- }
- 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;
-}
-
-
-ThriftHive_fetchAll_presult::~ThriftHive_fetchAll_presult() throw() {
-}
-
-
-uint32_t ThriftHive_fetchAll_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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 _size22;
- ::apache::thrift::protocol::TType _etype25;
- xfer += iprot->readListBegin(_etype25, _size22);
- (*(this->success)).resize(_size22);
- uint32_t _i26;
- for (_i26 = 0; _i26 < _size22; ++_i26)
- {
- xfer += iprot->readString((*(this->success))[_i26]);
- }
- xfer += 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;
-}
-
-
-ThriftHive_getSchema_args::~ThriftHive_getSchema_args() throw() {
-}
-
-
-uint32_t ThriftHive_getSchema_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_getSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getSchema_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getSchema_pargs::~ThriftHive_getSchema_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_getSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getSchema_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getSchema_result::~ThriftHive_getSchema_result() throw() {
-}
-
-
-uint32_t ThriftHive_getSchema_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getSchema_presult::~ThriftHive_getSchema_presult() throw() {
-}
-
-
-uint32_t ThriftHive_getSchema_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getThriftSchema_args::~ThriftHive_getThriftSchema_args() throw() {
-}
-
-
-uint32_t ThriftHive_getThriftSchema_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_getThriftSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getThriftSchema_pargs::~ThriftHive_getThriftSchema_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_getThriftSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getThriftSchema_result::~ThriftHive_getThriftSchema_result() throw() {
-}
-
-
-uint32_t ThriftHive_getThriftSchema_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getThriftSchema_presult::~ThriftHive_getThriftSchema_presult() throw() {
-}
-
-
-uint32_t ThriftHive_getThriftSchema_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getClusterStatus_args::~ThriftHive_getClusterStatus_args() throw() {
-}
-
-
-uint32_t ThriftHive_getClusterStatus_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_getClusterStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getClusterStatus_pargs::~ThriftHive_getClusterStatus_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_getClusterStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getClusterStatus_result::~ThriftHive_getClusterStatus_result() throw() {
-}
-
-
-uint32_t ThriftHive_getClusterStatus_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getClusterStatus_presult::~ThriftHive_getClusterStatus_presult() throw() {
-}
-
-
-uint32_t ThriftHive_getClusterStatus_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getQueryPlan_args::~ThriftHive_getQueryPlan_args() throw() {
-}
-
-
-uint32_t ThriftHive_getQueryPlan_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_getQueryPlan_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getQueryPlan_pargs::~ThriftHive_getQueryPlan_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_getQueryPlan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_getQueryPlan_result::~ThriftHive_getQueryPlan_result() throw() {
-}
-
-
-uint32_t ThriftHive_getQueryPlan_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_getQueryPlan_presult::~ThriftHive_getQueryPlan_presult() throw() {
-}
-
-
-uint32_t ThriftHive_getQueryPlan_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
-}
-
-
-ThriftHive_clean_args::~ThriftHive_clean_args() throw() {
-}
-
-
-uint32_t ThriftHive_clean_args::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_clean_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_clean_args");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_clean_pargs::~ThriftHive_clean_pargs() throw() {
-}
-
-
-uint32_t ThriftHive_clean_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("ThriftHive_clean_pargs");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_clean_result::~ThriftHive_clean_result() throw() {
-}
-
-
-uint32_t ThriftHive_clean_result::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- return xfer;
-}
-
-uint32_t ThriftHive_clean_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
-
- uint32_t xfer = 0;
-
- xfer += oprot->writeStructBegin("ThriftHive_clean_result");
-
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-
-ThriftHive_clean_presult::~ThriftHive_clean_presult() throw() {
-}
-
-
-uint32_t ThriftHive_clean_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- xfer += iprot->skip(ftype);
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("execute") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("fetchOne") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("fetchN") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("fetchAll") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("getSchema") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("getThriftSchema") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("getClusterStatus") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-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();
- }
- if (fname.compare("getQueryPlan") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- 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");
-}
-
-void ThriftHiveClient::clean()
-{
- send_clean();
- recv_clean();
-}
-
-void ThriftHiveClient::send_clean()
-{
- int32_t cseqid = 0;
- oprot_->writeMessageBegin("clean", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_clean_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-}
-
-void ThriftHiveClient::recv_clean()
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- iprot_->readMessageBegin(fname, mtype, rseqid);
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("clean") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- ThriftHive_clean_presult result;
- result.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- return;
-}
-
-bool ThriftHiveProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) {
- ProcessMap::iterator pfn;
- pfn = processMap_.find(fname);
- if (pfn == processMap_.end()) {
- return ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext);
- }
- (this->*(pfn->second))(seqid, iprot, oprot, callContext);
- return true;
-}
-
-void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.execute", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.execute");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.execute");
- }
-
- ThriftHive_execute_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.execute", bytes);
- }
-
- ThriftHive_execute_result result;
- try {
- iface_->execute(args.query);
- } catch (HiveServerException &ex) {
- result.ex = ex;
- result.__isset.ex = true;
- } catch (const std::exception& e) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.execute");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.execute");
- }
-
- oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.fetchOne", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchOne");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.fetchOne");
- }
-
- ThriftHive_fetchOne_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.fetchOne");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.fetchOne");
- }
-
- oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.fetchN", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchN");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.fetchN");
- }
-
- ThriftHive_fetchN_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.fetchN");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.fetchN");
- }
-
- oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.fetchAll", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchAll");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.fetchAll");
- }
-
- ThriftHive_fetchAll_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.fetchAll");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.fetchAll");
- }
-
- oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.getSchema", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getSchema");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.getSchema");
- }
-
- ThriftHive_getSchema_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.getSchema");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.getSchema");
- }
-
- oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.getThriftSchema", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getThriftSchema");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema");
- }
-
- ThriftHive_getThriftSchema_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema");
- }
-
- oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.getClusterStatus", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getClusterStatus");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus");
- }
-
- ThriftHive_getClusterStatus_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus");
- }
-
- oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.getQueryPlan", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getQueryPlan");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan");
- }
-
- ThriftHive_getQueryPlan_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes);
- }
-
- 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) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan");
- }
-
- oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes);
- }
-}
-
-void ThriftHiveProcessor::process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
-{
- void* ctx = NULL;
- if (this->eventHandler_.get() != NULL) {
- ctx = this->eventHandler_->getContext("ThriftHive.clean", callContext);
- }
- ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.clean");
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preRead(ctx, "ThriftHive.clean");
- }
-
- ThriftHive_clean_args args;
- args.read(iprot);
- iprot->readMessageEnd();
- uint32_t bytes = iprot->getTransport()->readEnd();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postRead(ctx, "ThriftHive.clean", bytes);
- }
-
- ThriftHive_clean_result result;
- try {
- iface_->clean();
- } catch (const std::exception& e) {
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->handlerError(ctx, "ThriftHive.clean");
- }
-
- ::apache::thrift::TApplicationException x(e.what());
- oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_EXCEPTION, seqid);
- x.write(oprot);
- oprot->writeMessageEnd();
- oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
- return;
- }
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->preWrite(ctx, "ThriftHive.clean");
- }
-
- oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_REPLY, seqid);
- result.write(oprot);
- oprot->writeMessageEnd();
- bytes = oprot->getTransport()->writeEnd();
- oprot->getTransport()->flush();
-
- if (this->eventHandler_.get() != NULL) {
- this->eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes);
- }
-}
-
-::boost::shared_ptr< ::apache::thrift::TProcessor > ThriftHiveProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) {
- ::apache::thrift::ReleaseHandler< ThriftHiveIfFactory > cleanup(handlerFactory_);
- ::boost::shared_ptr< ThriftHiveIf > handler(handlerFactory_->getHandler(connInfo), cleanup);
- ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftHiveProcessor(handler));
- return processor;
-}
-
-void ThriftHiveConcurrentClient::execute(const std::string& query)
-{
- int32_t seqid = send_execute(query);
- recv_execute(seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_execute(const std::string& query)
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("execute", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_execute_pargs args;
- args.query = &query;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_execute(const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("execute") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- ThriftHive_execute_presult result;
- result.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- sentry.commit();
- return;
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::fetchOne(std::string& _return)
-{
- int32_t seqid = send_fetchOne();
- recv_fetchOne(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_fetchOne()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_fetchOne_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_fetchOne(std::string& _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("fetchOne") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchOne failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::fetchN(std::vector & _return, const int32_t numRows)
-{
- int32_t seqid = send_fetchN(numRows);
- recv_fetchN(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_fetchN(const int32_t numRows)
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_fetchN_pargs args;
- args.numRows = &numRows;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_fetchN(std::vector & _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("fetchN") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchN failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::fetchAll(std::vector & _return)
-{
- int32_t seqid = send_fetchAll();
- recv_fetchAll(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_fetchAll()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_fetchAll_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_fetchAll(std::vector & _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("fetchAll") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchAll failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::getSchema( ::Apache::Hadoop::Hive::Schema& _return)
-{
- int32_t seqid = send_getSchema();
- recv_getSchema(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_getSchema()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_getSchema_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("getSchema") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getSchema failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return)
-{
- int32_t seqid = send_getThriftSchema();
- recv_getThriftSchema(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_getThriftSchema()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_getThriftSchema_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("getThriftSchema") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getThriftSchema failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::getClusterStatus(HiveClusterStatus& _return)
-{
- int32_t seqid = send_getClusterStatus();
- recv_getClusterStatus(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_getClusterStatus()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_getClusterStatus_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_getClusterStatus(HiveClusterStatus& _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("getClusterStatus") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getClusterStatus failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return)
-{
- int32_t seqid = send_getQueryPlan();
- recv_getQueryPlan(_return, seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_getQueryPlan()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_getQueryPlan_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return, const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("getQueryPlan") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- 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
- sentry.commit();
- return;
- }
- if (result.__isset.ex) {
- sentry.commit();
- throw result.ex;
- }
- // in a bad state, don't commit
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getQueryPlan failed: unknown result");
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-void ThriftHiveConcurrentClient::clean()
-{
- int32_t seqid = send_clean();
- recv_clean(seqid);
-}
-
-int32_t ThriftHiveConcurrentClient::send_clean()
-{
- int32_t cseqid = this->sync_.generateSeqId();
- ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_);
- oprot_->writeMessageBegin("clean", ::apache::thrift::protocol::T_CALL, cseqid);
-
- ThriftHive_clean_pargs args;
- args.write(oprot_);
-
- oprot_->writeMessageEnd();
- oprot_->getTransport()->writeEnd();
- oprot_->getTransport()->flush();
-
- sentry.commit();
- return cseqid;
-}
-
-void ThriftHiveConcurrentClient::recv_clean(const int32_t seqid)
-{
-
- int32_t rseqid = 0;
- std::string fname;
- ::apache::thrift::protocol::TMessageType mtype;
-
- // the read mutex gets dropped and reacquired as part of waitForWork()
- // The destructor of this sentry wakes up other clients
- ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid);
-
- while(true) {
- if(!this->sync_.getPending(fname, mtype, rseqid)) {
- iprot_->readMessageBegin(fname, mtype, rseqid);
- }
- if(seqid == rseqid) {
- if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
- ::apache::thrift::TApplicationException x;
- x.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- sentry.commit();
- throw x;
- }
- if (mtype != ::apache::thrift::protocol::T_REPLY) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
- }
- if (fname.compare("clean") != 0) {
- iprot_->skip(::apache::thrift::protocol::T_STRUCT);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- // in a bad state, don't commit
- using ::apache::thrift::protocol::TProtocolException;
- throw TProtocolException(TProtocolException::INVALID_DATA);
- }
- ThriftHive_clean_presult result;
- result.read(iprot_);
- iprot_->readMessageEnd();
- iprot_->getTransport()->readEnd();
-
- sentry.commit();
- return;
- }
- // seqid != rseqid
- this->sync_.updatePending(fname, mtype, rseqid);
-
- // this will temporarily unlock the readMutex, and let other clients get work done
- this->sync_.waitForWork(seqid);
- } // end while(true)
-}
-
-}}} // namespace
-
diff --git service/src/gen/thrift/gen-cpp/ThriftHive.h service/src/gen/thrift/gen-cpp/ThriftHive.h
deleted file mode 100644
index 902bd4b..0000000
--- service/src/gen/thrift/gen-cpp/ThriftHive.h
+++ /dev/null
@@ -1,1224 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#ifndef ThriftHive_H
-#define ThriftHive_H
-
-#include
-#include
-#include "hive_service_types.h"
-#include "ThriftHiveMetastore.h"
-
-namespace Apache { namespace Hadoop { namespace Hive {
-
-#ifdef _WIN32
- #pragma warning( push )
- #pragma warning (disable : 4250 ) //inheriting methods via dominance
-#endif
-
-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;
- virtual void clean() = 0;
-};
-
-class ThriftHiveIfFactory : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIfFactory {
- public:
- typedef ThriftHiveIf Handler;
-
- virtual ~ThriftHiveIfFactory() {}
-
- virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
- virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) = 0;
-};
-
-class ThriftHiveIfSingletonFactory : virtual public ThriftHiveIfFactory {
- public:
- ThriftHiveIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {}
- virtual ~ThriftHiveIfSingletonFactory() {}
-
- virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo&) {
- return iface_.get();
- }
- virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) {}
-
- protected:
- boost::shared_ptr iface_;
-};
-
-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;
- }
- void clean() {
- return;
- }
-};
-
-typedef struct _ThriftHive_execute_args__isset {
- _ThriftHive_execute_args__isset() : query(false) {}
- bool query :1;
-} _ThriftHive_execute_args__isset;
-
-class ThriftHive_execute_args {
- public:
-
- ThriftHive_execute_args(const ThriftHive_execute_args&);
- ThriftHive_execute_args& operator=(const ThriftHive_execute_args&);
- ThriftHive_execute_args() : query() {
- }
-
- virtual ~ThriftHive_execute_args() throw();
- std::string query;
-
- _ThriftHive_execute_args__isset __isset;
-
- void __set_query(const std::string& val);
-
- 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 :1;
-} _ThriftHive_execute_result__isset;
-
-class ThriftHive_execute_result {
- public:
-
- ThriftHive_execute_result(const ThriftHive_execute_result&);
- ThriftHive_execute_result& operator=(const ThriftHive_execute_result&);
- ThriftHive_execute_result() {
- }
-
- virtual ~ThriftHive_execute_result() throw();
- HiveServerException ex;
-
- _ThriftHive_execute_result__isset __isset;
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
-} _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(const ThriftHive_fetchOne_args&);
- ThriftHive_fetchOne_args& operator=(const ThriftHive_fetchOne_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_fetchOne_result__isset;
-
-class ThriftHive_fetchOne_result {
- public:
-
- ThriftHive_fetchOne_result(const ThriftHive_fetchOne_result&);
- ThriftHive_fetchOne_result& operator=(const ThriftHive_fetchOne_result&);
- ThriftHive_fetchOne_result() : success() {
- }
-
- virtual ~ThriftHive_fetchOne_result() throw();
- std::string success;
- HiveServerException ex;
-
- _ThriftHive_fetchOne_result__isset __isset;
-
- void __set_success(const std::string& val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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 :1;
-} _ThriftHive_fetchN_args__isset;
-
-class ThriftHive_fetchN_args {
- public:
-
- ThriftHive_fetchN_args(const ThriftHive_fetchN_args&);
- ThriftHive_fetchN_args& operator=(const ThriftHive_fetchN_args&);
- ThriftHive_fetchN_args() : numRows(0) {
- }
-
- virtual ~ThriftHive_fetchN_args() throw();
- int32_t numRows;
-
- _ThriftHive_fetchN_args__isset __isset;
-
- void __set_numRows(const int32_t val);
-
- 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 :1;
- bool ex :1;
-} _ThriftHive_fetchN_result__isset;
-
-class ThriftHive_fetchN_result {
- public:
-
- ThriftHive_fetchN_result(const ThriftHive_fetchN_result&);
- ThriftHive_fetchN_result& operator=(const ThriftHive_fetchN_result&);
- ThriftHive_fetchN_result() {
- }
-
- virtual ~ThriftHive_fetchN_result() throw();
- std::vector success;
- HiveServerException ex;
-
- _ThriftHive_fetchN_result__isset __isset;
-
- void __set_success(const std::vector & val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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(const ThriftHive_fetchAll_args&);
- ThriftHive_fetchAll_args& operator=(const ThriftHive_fetchAll_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_fetchAll_result__isset;
-
-class ThriftHive_fetchAll_result {
- public:
-
- ThriftHive_fetchAll_result(const ThriftHive_fetchAll_result&);
- ThriftHive_fetchAll_result& operator=(const ThriftHive_fetchAll_result&);
- ThriftHive_fetchAll_result() {
- }
-
- virtual ~ThriftHive_fetchAll_result() throw();
- std::vector success;
- HiveServerException ex;
-
- _ThriftHive_fetchAll_result__isset __isset;
-
- void __set_success(const std::vector & val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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(const ThriftHive_getSchema_args&);
- ThriftHive_getSchema_args& operator=(const ThriftHive_getSchema_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_getSchema_result__isset;
-
-class ThriftHive_getSchema_result {
- public:
-
- ThriftHive_getSchema_result(const ThriftHive_getSchema_result&);
- ThriftHive_getSchema_result& operator=(const ThriftHive_getSchema_result&);
- ThriftHive_getSchema_result() {
- }
-
- virtual ~ThriftHive_getSchema_result() throw();
- ::Apache::Hadoop::Hive::Schema success;
- HiveServerException ex;
-
- _ThriftHive_getSchema_result__isset __isset;
-
- void __set_success(const ::Apache::Hadoop::Hive::Schema& val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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(const ThriftHive_getThriftSchema_args&);
- ThriftHive_getThriftSchema_args& operator=(const ThriftHive_getThriftSchema_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_getThriftSchema_result__isset;
-
-class ThriftHive_getThriftSchema_result {
- public:
-
- ThriftHive_getThriftSchema_result(const ThriftHive_getThriftSchema_result&);
- ThriftHive_getThriftSchema_result& operator=(const ThriftHive_getThriftSchema_result&);
- ThriftHive_getThriftSchema_result() {
- }
-
- virtual ~ThriftHive_getThriftSchema_result() throw();
- ::Apache::Hadoop::Hive::Schema success;
- HiveServerException ex;
-
- _ThriftHive_getThriftSchema_result__isset __isset;
-
- void __set_success(const ::Apache::Hadoop::Hive::Schema& val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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(const ThriftHive_getClusterStatus_args&);
- ThriftHive_getClusterStatus_args& operator=(const ThriftHive_getClusterStatus_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_getClusterStatus_result__isset;
-
-class ThriftHive_getClusterStatus_result {
- public:
-
- ThriftHive_getClusterStatus_result(const ThriftHive_getClusterStatus_result&);
- ThriftHive_getClusterStatus_result& operator=(const ThriftHive_getClusterStatus_result&);
- ThriftHive_getClusterStatus_result() {
- }
-
- virtual ~ThriftHive_getClusterStatus_result() throw();
- HiveClusterStatus success;
- HiveServerException ex;
-
- _ThriftHive_getClusterStatus_result__isset __isset;
-
- void __set_success(const HiveClusterStatus& val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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(const ThriftHive_getQueryPlan_args&);
- ThriftHive_getQueryPlan_args& operator=(const ThriftHive_getQueryPlan_args&);
- 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 :1;
- bool ex :1;
-} _ThriftHive_getQueryPlan_result__isset;
-
-class ThriftHive_getQueryPlan_result {
- public:
-
- ThriftHive_getQueryPlan_result(const ThriftHive_getQueryPlan_result&);
- ThriftHive_getQueryPlan_result& operator=(const ThriftHive_getQueryPlan_result&);
- ThriftHive_getQueryPlan_result() {
- }
-
- virtual ~ThriftHive_getQueryPlan_result() throw();
- ::Apache::Hadoop::Hive::QueryPlan success;
- HiveServerException ex;
-
- _ThriftHive_getQueryPlan_result__isset __isset;
-
- void __set_success(const ::Apache::Hadoop::Hive::QueryPlan& val);
-
- void __set_ex(const HiveServerException& val);
-
- 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 :1;
- bool ex :1;
-} _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 ThriftHive_clean_args {
- public:
-
- ThriftHive_clean_args(const ThriftHive_clean_args&);
- ThriftHive_clean_args& operator=(const ThriftHive_clean_args&);
- ThriftHive_clean_args() {
- }
-
- virtual ~ThriftHive_clean_args() throw();
-
- bool operator == (const ThriftHive_clean_args & /* rhs */) const
- {
- return true;
- }
- bool operator != (const ThriftHive_clean_args &rhs) const {
- return !(*this == rhs);
- }
-
- bool operator < (const ThriftHive_clean_args & ) const;
-
- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
-
-};
-
-
-class ThriftHive_clean_pargs {
- public:
-
-
- virtual ~ThriftHive_clean_pargs() throw();
-
- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
-
-};
-
-
-class ThriftHive_clean_result {
- public:
-
- ThriftHive_clean_result(const ThriftHive_clean_result&);
- ThriftHive_clean_result& operator=(const ThriftHive_clean_result&);
- ThriftHive_clean_result() {
- }
-
- virtual ~ThriftHive_clean_result() throw();
-
- bool operator == (const ThriftHive_clean_result & /* rhs */) const
- {
- return true;
- }
- bool operator != (const ThriftHive_clean_result &rhs) const {
- return !(*this == rhs);
- }
-
- bool operator < (const ThriftHive_clean_result & ) const;
-
- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
-
-};
-
-
-class ThriftHive_clean_presult {
- public:
-
-
- virtual ~ThriftHive_clean_presult() throw();
-
- 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);
- void clean();
- void send_clean();
- void recv_clean();
-};
-
-class ThriftHiveProcessor : public ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor {
- protected:
- boost::shared_ptr iface_;
- virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext);
- private:
- typedef void (ThriftHiveProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
- typedef std::map ProcessMap;
- ProcessMap processMap_;
- void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- void process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
- 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;
- processMap_["clean"] = &ThriftHiveProcessor::process_clean;
- }
-
- virtual ~ThriftHiveProcessor() {}
-};
-
-class ThriftHiveProcessorFactory : public ::apache::thrift::TProcessorFactory {
- public:
- ThriftHiveProcessorFactory(const ::boost::shared_ptr< ThriftHiveIfFactory >& handlerFactory) :
- handlerFactory_(handlerFactory) {}
-
- ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo);
-
- protected:
- ::boost::shared_ptr< ThriftHiveIfFactory > handlerFactory_;
-};
-
-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) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->execute(query);
- }
- ifaces_[i]->execute(query);
- }
-
- void fetchOne(std::string& _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->fetchOne(_return);
- }
- ifaces_[i]->fetchOne(_return);
- return;
- }
-
- void fetchN(std::vector & _return, const int32_t numRows) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->fetchN(_return, numRows);
- }
- ifaces_[i]->fetchN(_return, numRows);
- return;
- }
-
- void fetchAll(std::vector & _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->fetchAll(_return);
- }
- ifaces_[i]->fetchAll(_return);
- return;
- }
-
- void getSchema( ::Apache::Hadoop::Hive::Schema& _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->getSchema(_return);
- }
- ifaces_[i]->getSchema(_return);
- return;
- }
-
- void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->getThriftSchema(_return);
- }
- ifaces_[i]->getThriftSchema(_return);
- return;
- }
-
- void getClusterStatus(HiveClusterStatus& _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->getClusterStatus(_return);
- }
- ifaces_[i]->getClusterStatus(_return);
- return;
- }
-
- void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->getQueryPlan(_return);
- }
- ifaces_[i]->getQueryPlan(_return);
- return;
- }
-
- void clean() {
- size_t sz = ifaces_.size();
- size_t i = 0;
- for (; i < (sz - 1); ++i) {
- ifaces_[i]->clean();
- }
- ifaces_[i]->clean();
- }
-
-};
-
-// The 'concurrent' client is a thread safe client that correctly handles
-// out of order responses. It is slower than the regular client, so should
-// only be used when you need to share a connection among multiple threads
-class ThriftHiveConcurrentClient : virtual public ThriftHiveIf, public ::Apache::Hadoop::Hive::ThriftHiveMetastoreConcurrentClient {
- public:
- ThriftHiveConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
- ::Apache::Hadoop::Hive::ThriftHiveMetastoreConcurrentClient(prot, prot) {}
- ThriftHiveConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : ::Apache::Hadoop::Hive::ThriftHiveMetastoreConcurrentClient(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);
- int32_t send_execute(const std::string& query);
- void recv_execute(const int32_t seqid);
- void fetchOne(std::string& _return);
- int32_t send_fetchOne();
- void recv_fetchOne(std::string& _return, const int32_t seqid);
- void fetchN(std::vector & _return, const int32_t numRows);
- int32_t send_fetchN(const int32_t numRows);
- void recv_fetchN(std::vector & _return, const int32_t seqid);
- void fetchAll(std::vector & _return);
- int32_t send_fetchAll();
- void recv_fetchAll(std::vector & _return, const int32_t seqid);
- void getSchema( ::Apache::Hadoop::Hive::Schema& _return);
- int32_t send_getSchema();
- void recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return, const int32_t seqid);
- void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return);
- int32_t send_getThriftSchema();
- void recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return, const int32_t seqid);
- void getClusterStatus(HiveClusterStatus& _return);
- int32_t send_getClusterStatus();
- void recv_getClusterStatus(HiveClusterStatus& _return, const int32_t seqid);
- void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return);
- int32_t send_getQueryPlan();
- void recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return, const int32_t seqid);
- void clean();
- int32_t send_clean();
- void recv_clean(const int32_t seqid);
-};
-
-#ifdef _WIN32
- #pragma warning( pop )
-#endif
-
-}}} // namespace
-
-#endif
diff --git service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
deleted file mode 100644
index 3b61b76..0000000
--- service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
+++ /dev/null
@@ -1,84 +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");
- }
-
- void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) {
- // Your implementation goes here
- printf("getQueryPlan\n");
- }
-
- void clean() {
- // Your implementation goes here
- printf("clean\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
deleted file mode 100644
index e2bbe71..0000000
--- service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#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
deleted file mode 100644
index e0887f4..0000000
--- service/src/gen/thrift/gen-cpp/hive_service_constants.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#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
deleted file mode 100644
index 9ddf7c1..0000000
--- service/src/gen/thrift/gen-cpp/hive_service_types.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#include "hive_service_types.h"
-
-#include
-#include
-
-#include
-
-namespace Apache { namespace Hadoop { namespace Hive {
-
-int _kJobTrackerStateValues[] = {
- JobTrackerState::INITIALIZING,
- JobTrackerState::RUNNING
-};
-const char* _kJobTrackerStateNames[] = {
- "INITIALIZING",
- "RUNNING"
-};
-const std::map _JobTrackerState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kJobTrackerStateValues, _kJobTrackerStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-
-
-HiveClusterStatus::~HiveClusterStatus() throw() {
-}
-
-
-void HiveClusterStatus::__set_taskTrackers(const int32_t val) {
- this->taskTrackers = val;
-}
-
-void HiveClusterStatus::__set_mapTasks(const int32_t val) {
- this->mapTasks = val;
-}
-
-void HiveClusterStatus::__set_reduceTasks(const int32_t val) {
- this->reduceTasks = val;
-}
-
-void HiveClusterStatus::__set_maxMapTasks(const int32_t val) {
- this->maxMapTasks = val;
-}
-
-void HiveClusterStatus::__set_maxReduceTasks(const int32_t val) {
- this->maxReduceTasks = val;
-}
-
-void HiveClusterStatus::__set_state(const JobTrackerState::type val) {
- this->state = val;
-}
-
-uint32_t HiveClusterStatus::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-void swap(HiveClusterStatus &a, HiveClusterStatus &b) {
- using ::std::swap;
- swap(a.taskTrackers, b.taskTrackers);
- swap(a.mapTasks, b.mapTasks);
- swap(a.reduceTasks, b.reduceTasks);
- swap(a.maxMapTasks, b.maxMapTasks);
- swap(a.maxReduceTasks, b.maxReduceTasks);
- swap(a.state, b.state);
- swap(a.__isset, b.__isset);
-}
-
-HiveClusterStatus::HiveClusterStatus(const HiveClusterStatus& other1) {
- taskTrackers = other1.taskTrackers;
- mapTasks = other1.mapTasks;
- reduceTasks = other1.reduceTasks;
- maxMapTasks = other1.maxMapTasks;
- maxReduceTasks = other1.maxReduceTasks;
- state = other1.state;
- __isset = other1.__isset;
-}
-HiveClusterStatus& HiveClusterStatus::operator=(const HiveClusterStatus& other2) {
- taskTrackers = other2.taskTrackers;
- mapTasks = other2.mapTasks;
- reduceTasks = other2.reduceTasks;
- maxMapTasks = other2.maxMapTasks;
- maxReduceTasks = other2.maxReduceTasks;
- state = other2.state;
- __isset = other2.__isset;
- return *this;
-}
-void HiveClusterStatus::printTo(std::ostream& out) const {
- using ::apache::thrift::to_string;
- out << "HiveClusterStatus(";
- out << "taskTrackers=" << to_string(taskTrackers);
- out << ", " << "mapTasks=" << to_string(mapTasks);
- out << ", " << "reduceTasks=" << to_string(reduceTasks);
- out << ", " << "maxMapTasks=" << to_string(maxMapTasks);
- out << ", " << "maxReduceTasks=" << to_string(maxReduceTasks);
- out << ", " << "state=" << to_string(state);
- out << ")";
-}
-
-
-HiveServerException::~HiveServerException() throw() {
-}
-
-
-void HiveServerException::__set_message(const std::string& val) {
- this->message = val;
-}
-
-void HiveServerException::__set_errorCode(const int32_t val) {
- this->errorCode = val;
-}
-
-void HiveServerException::__set_SQLState(const std::string& val) {
- this->SQLState = val;
-}
-
-uint32_t HiveServerException::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- 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;
- apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- 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;
-}
-
-void swap(HiveServerException &a, HiveServerException &b) {
- using ::std::swap;
- swap(a.message, b.message);
- swap(a.errorCode, b.errorCode);
- swap(a.SQLState, b.SQLState);
- swap(a.__isset, b.__isset);
-}
-
-HiveServerException::HiveServerException(const HiveServerException& other3) : TException() {
- message = other3.message;
- errorCode = other3.errorCode;
- SQLState = other3.SQLState;
- __isset = other3.__isset;
-}
-HiveServerException& HiveServerException::operator=(const HiveServerException& other4) {
- message = other4.message;
- errorCode = other4.errorCode;
- SQLState = other4.SQLState;
- __isset = other4.__isset;
- return *this;
-}
-void HiveServerException::printTo(std::ostream& out) const {
- using ::apache::thrift::to_string;
- out << "HiveServerException(";
- out << "message=" << to_string(message);
- out << ", " << "errorCode=" << to_string(errorCode);
- out << ", " << "SQLState=" << to_string(SQLState);
- out << ")";
-}
-
-const char* HiveServerException::what() const throw() {
- try {
- std::stringstream ss;
- ss << "TException - service has thrown: " << *this;
- this->thriftTExceptionMessageHolder_ = ss.str();
- return this->thriftTExceptionMessageHolder_.c_str();
- } catch (const std::exception&) {
- return "TException - service has thrown: HiveServerException";
- }
-}
-
-}}} // namespace
diff --git service/src/gen/thrift/gen-cpp/hive_service_types.h service/src/gen/thrift/gen-cpp/hive_service_types.h
deleted file mode 100644
index 266f8ea..0000000
--- service/src/gen/thrift/gen-cpp/hive_service_types.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-#ifndef hive_service_TYPES_H
-#define hive_service_TYPES_H
-
-#include
-
-#include
-#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
- };
-};
-
-extern const std::map _JobTrackerState_VALUES_TO_NAMES;
-
-class HiveClusterStatus;
-
-class HiveServerException;
-
-typedef struct _HiveClusterStatus__isset {
- _HiveClusterStatus__isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {}
- bool taskTrackers :1;
- bool mapTasks :1;
- bool reduceTasks :1;
- bool maxMapTasks :1;
- bool maxReduceTasks :1;
- bool state :1;
-} _HiveClusterStatus__isset;
-
-class HiveClusterStatus {
- public:
-
- HiveClusterStatus(const HiveClusterStatus&);
- HiveClusterStatus& operator=(const HiveClusterStatus&);
- HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0), state((JobTrackerState::type)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;
-
- void __set_taskTrackers(const int32_t val);
-
- void __set_mapTasks(const int32_t val);
-
- void __set_reduceTasks(const int32_t val);
-
- void __set_maxMapTasks(const int32_t val);
-
- void __set_maxReduceTasks(const int32_t val);
-
- void __set_state(const JobTrackerState::type val);
-
- 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;
-
- virtual void printTo(std::ostream& out) const;
-};
-
-void swap(HiveClusterStatus &a, HiveClusterStatus &b);
-
-inline std::ostream& operator<<(std::ostream& out, const HiveClusterStatus& obj)
-{
- obj.printTo(out);
- return out;
-}
-
-typedef struct _HiveServerException__isset {
- _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {}
- bool message :1;
- bool errorCode :1;
- bool SQLState :1;
-} _HiveServerException__isset;
-
-class HiveServerException : public ::apache::thrift::TException {
- public:
-
- HiveServerException(const HiveServerException&);
- HiveServerException& operator=(const HiveServerException&);
- HiveServerException() : message(), errorCode(0), SQLState() {
- }
-
- virtual ~HiveServerException() throw();
- std::string message;
- int32_t errorCode;
- std::string SQLState;
-
- _HiveServerException__isset __isset;
-
- void __set_message(const std::string& val);
-
- void __set_errorCode(const int32_t val);
-
- void __set_SQLState(const std::string& val);
-
- 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;
-
- virtual void printTo(std::ostream& out) const;
- mutable std::string thriftTExceptionMessageHolder_;
- const char* what() const throw();
-};
-
-void swap(HiveServerException &a, HiveServerException &b);
-
-inline std::ostream& operator<<(std::ostream& out, const HiveServerException& obj)
-{
- obj.printTo(out);
- return out;
-}
-
-}}} // 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
deleted file mode 100644
index ad89867..0000000
--- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
+++ /dev/null
@@ -1,901 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hadoop.hive.service;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-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 javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class HiveClusterStatus implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveClusterStatus");
-
- private static final org.apache.thrift.protocol.TField TASK_TRACKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskTrackers", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("mapTasks", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("reduceTasks", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final org.apache.thrift.protocol.TField MAX_MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMapTasks", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HiveClusterStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HiveClusterStatusTupleSchemeFactory());
- }
-
- private int taskTrackers; // required
- private int mapTasks; // required
- private int reduceTasks; // required
- private int maxMapTasks; // required
- private int maxReduceTasks; // required
- private JobTrackerState state; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- 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 byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TASK_TRACKERS, new org.apache.thrift.meta_data.FieldMetaData("taskTrackers", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("mapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("reduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MAX_MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxMapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MAX_REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxReduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobTrackerState.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.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_bitfield = other.__isset_bitfield;
- 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_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID);
- }
-
- /** Returns true if field taskTrackers is set (has been assigned a value) and false otherwise */
- public boolean isSetTaskTrackers() {
- return EncodingUtils.testBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID);
- }
-
- public void setTaskTrackersIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID, value);
- }
-
- public int getMapTasks() {
- return this.mapTasks;
- }
-
- public void setMapTasks(int mapTasks) {
- this.mapTasks = mapTasks;
- setMapTasksIsSet(true);
- }
-
- public void unsetMapTasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAPTASKS_ISSET_ID);
- }
-
- /** Returns true if field mapTasks is set (has been assigned a value) and false otherwise */
- public boolean isSetMapTasks() {
- return EncodingUtils.testBit(__isset_bitfield, __MAPTASKS_ISSET_ID);
- }
-
- public void setMapTasksIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAPTASKS_ISSET_ID, value);
- }
-
- public int getReduceTasks() {
- return this.reduceTasks;
- }
-
- public void setReduceTasks(int reduceTasks) {
- this.reduceTasks = reduceTasks;
- setReduceTasksIsSet(true);
- }
-
- public void unsetReduceTasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REDUCETASKS_ISSET_ID);
- }
-
- /** Returns true if field reduceTasks is set (has been assigned a value) and false otherwise */
- public boolean isSetReduceTasks() {
- return EncodingUtils.testBit(__isset_bitfield, __REDUCETASKS_ISSET_ID);
- }
-
- public void setReduceTasksIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REDUCETASKS_ISSET_ID, value);
- }
-
- public int getMaxMapTasks() {
- return this.maxMapTasks;
- }
-
- public void setMaxMapTasks(int maxMapTasks) {
- this.maxMapTasks = maxMapTasks;
- setMaxMapTasksIsSet(true);
- }
-
- public void unsetMaxMapTasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID);
- }
-
- /** Returns true if field maxMapTasks is set (has been assigned a value) and false otherwise */
- public boolean isSetMaxMapTasks() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID);
- }
-
- public void setMaxMapTasksIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID, value);
- }
-
- public int getMaxReduceTasks() {
- return this.maxReduceTasks;
- }
-
- public void setMaxReduceTasks(int maxReduceTasks) {
- this.maxReduceTasks = maxReduceTasks;
- setMaxReduceTasksIsSet(true);
- }
-
- public void unsetMaxReduceTasks() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID);
- }
-
- /** Returns true if field maxReduceTasks is set (has been assigned a value) and false otherwise */
- public boolean isSetMaxReduceTasks() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID);
- }
-
- public void setMaxReduceTasksIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __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 assigned 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 getTaskTrackers();
-
- case MAP_TASKS:
- return getMapTasks();
-
- case REDUCE_TASKS:
- return getReduceTasks();
-
- case MAX_MAP_TASKS:
- return getMaxMapTasks();
-
- case MAX_REDUCE_TASKS:
- return getMaxReduceTasks();
-
- case STATE:
- return getState();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case 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() {
- List