| /** |
| * Autogenerated by Thrift Compiler (0.9.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| #ifndef ThriftHive_H |
| #define ThriftHive_H |
| |
| #include <thrift/TDispatchProcessor.h> |
| #include "hive_service_types.h" |
| #include "ThriftHiveMetastore.h" |
| |
| namespace Apache { namespace Hadoop { namespace Hive { |
| |
| class ThriftHiveIf : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIf { |
| public: |
| virtual ~ThriftHiveIf() {} |
| virtual void execute(const std::string& query) = 0; |
| virtual void fetchOne(std::string& _return) = 0; |
| virtual void fetchN(std::vector<std::string> & _return, const int32_t numRows) = 0; |
| virtual void fetchAll(std::vector<std::string> & _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<ThriftHiveIf>& 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<ThriftHiveIf> 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<std::string> & /* _return */, const int32_t /* numRows */) { |
| return; |
| } |
| void fetchAll(std::vector<std::string> & /* _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; |
| } _ThriftHive_execute_args__isset; |
| |
| class ThriftHive_execute_args { |
| public: |
| |
| ThriftHive_execute_args() : query() { |
| } |
| |
| virtual ~ThriftHive_execute_args() throw() {} |
| |
| std::string query; |
| |
| _ThriftHive_execute_args__isset __isset; |
| |
| void __set_query(const std::string& val) { |
| query = 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; |
| } _ThriftHive_execute_result__isset; |
| |
| class ThriftHive_execute_result { |
| public: |
| |
| ThriftHive_execute_result() { |
| } |
| |
| virtual ~ThriftHive_execute_result() throw() {} |
| |
| HiveServerException ex; |
| |
| _ThriftHive_execute_result__isset __isset; |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| } _ThriftHive_execute_presult__isset; |
| |
| class ThriftHive_execute_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_execute_presult() throw() {} |
| |
| HiveServerException ex; |
| |
| _ThriftHive_execute_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_fetchOne_args { |
| public: |
| |
| ThriftHive_fetchOne_args() { |
| } |
| |
| virtual ~ThriftHive_fetchOne_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_fetchOne_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_fetchOne_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_fetchOne_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_fetchOne_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_fetchOne_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_fetchOne_result__isset { |
| _ThriftHive_fetchOne_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_fetchOne_result__isset; |
| |
| class ThriftHive_fetchOne_result { |
| public: |
| |
| ThriftHive_fetchOne_result() : success() { |
| } |
| |
| virtual ~ThriftHive_fetchOne_result() throw() {} |
| |
| std::string success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchOne_result__isset __isset; |
| |
| void __set_success(const std::string& val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_fetchOne_presult__isset; |
| |
| class ThriftHive_fetchOne_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_fetchOne_presult() throw() {} |
| |
| std::string* success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchOne_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| typedef struct _ThriftHive_fetchN_args__isset { |
| _ThriftHive_fetchN_args__isset() : numRows(false) {} |
| bool numRows; |
| } _ThriftHive_fetchN_args__isset; |
| |
| class ThriftHive_fetchN_args { |
| public: |
| |
| ThriftHive_fetchN_args() : numRows(0) { |
| } |
| |
| virtual ~ThriftHive_fetchN_args() throw() {} |
| |
| int32_t numRows; |
| |
| _ThriftHive_fetchN_args__isset __isset; |
| |
| void __set_numRows(const int32_t val) { |
| numRows = 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; |
| bool ex; |
| } _ThriftHive_fetchN_result__isset; |
| |
| class ThriftHive_fetchN_result { |
| public: |
| |
| ThriftHive_fetchN_result() { |
| } |
| |
| virtual ~ThriftHive_fetchN_result() throw() {} |
| |
| std::vector<std::string> success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchN_result__isset __isset; |
| |
| void __set_success(const std::vector<std::string> & val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_fetchN_presult__isset; |
| |
| class ThriftHive_fetchN_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_fetchN_presult() throw() {} |
| |
| std::vector<std::string> * success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchN_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_fetchAll_args { |
| public: |
| |
| ThriftHive_fetchAll_args() { |
| } |
| |
| virtual ~ThriftHive_fetchAll_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_fetchAll_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_fetchAll_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_fetchAll_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_fetchAll_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_fetchAll_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_fetchAll_result__isset { |
| _ThriftHive_fetchAll_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_fetchAll_result__isset; |
| |
| class ThriftHive_fetchAll_result { |
| public: |
| |
| ThriftHive_fetchAll_result() { |
| } |
| |
| virtual ~ThriftHive_fetchAll_result() throw() {} |
| |
| std::vector<std::string> success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchAll_result__isset __isset; |
| |
| void __set_success(const std::vector<std::string> & val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_fetchAll_presult__isset; |
| |
| class ThriftHive_fetchAll_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_fetchAll_presult() throw() {} |
| |
| std::vector<std::string> * success; |
| HiveServerException ex; |
| |
| _ThriftHive_fetchAll_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_getSchema_args { |
| public: |
| |
| ThriftHive_getSchema_args() { |
| } |
| |
| virtual ~ThriftHive_getSchema_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_getSchema_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_getSchema_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_getSchema_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_getSchema_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_getSchema_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_getSchema_result__isset { |
| _ThriftHive_getSchema_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_getSchema_result__isset; |
| |
| class ThriftHive_getSchema_result { |
| public: |
| |
| ThriftHive_getSchema_result() { |
| } |
| |
| virtual ~ThriftHive_getSchema_result() throw() {} |
| |
| ::Apache::Hadoop::Hive::Schema success; |
| HiveServerException ex; |
| |
| _ThriftHive_getSchema_result__isset __isset; |
| |
| void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_getSchema_presult__isset; |
| |
| class ThriftHive_getSchema_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_getSchema_presult() throw() {} |
| |
| ::Apache::Hadoop::Hive::Schema* success; |
| HiveServerException ex; |
| |
| _ThriftHive_getSchema_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_getThriftSchema_args { |
| public: |
| |
| ThriftHive_getThriftSchema_args() { |
| } |
| |
| virtual ~ThriftHive_getThriftSchema_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_getThriftSchema_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_getThriftSchema_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_getThriftSchema_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_getThriftSchema_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_getThriftSchema_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_getThriftSchema_result__isset { |
| _ThriftHive_getThriftSchema_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_getThriftSchema_result__isset; |
| |
| class ThriftHive_getThriftSchema_result { |
| public: |
| |
| ThriftHive_getThriftSchema_result() { |
| } |
| |
| virtual ~ThriftHive_getThriftSchema_result() throw() {} |
| |
| ::Apache::Hadoop::Hive::Schema success; |
| HiveServerException ex; |
| |
| _ThriftHive_getThriftSchema_result__isset __isset; |
| |
| void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_getThriftSchema_presult__isset; |
| |
| class ThriftHive_getThriftSchema_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_getThriftSchema_presult() throw() {} |
| |
| ::Apache::Hadoop::Hive::Schema* success; |
| HiveServerException ex; |
| |
| _ThriftHive_getThriftSchema_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_getClusterStatus_args { |
| public: |
| |
| ThriftHive_getClusterStatus_args() { |
| } |
| |
| virtual ~ThriftHive_getClusterStatus_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_getClusterStatus_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_getClusterStatus_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_getClusterStatus_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_getClusterStatus_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_getClusterStatus_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_getClusterStatus_result__isset { |
| _ThriftHive_getClusterStatus_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_getClusterStatus_result__isset; |
| |
| class ThriftHive_getClusterStatus_result { |
| public: |
| |
| ThriftHive_getClusterStatus_result() { |
| } |
| |
| virtual ~ThriftHive_getClusterStatus_result() throw() {} |
| |
| HiveClusterStatus success; |
| HiveServerException ex; |
| |
| _ThriftHive_getClusterStatus_result__isset __isset; |
| |
| void __set_success(const HiveClusterStatus& val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_getClusterStatus_presult__isset; |
| |
| class ThriftHive_getClusterStatus_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_getClusterStatus_presult() throw() {} |
| |
| HiveClusterStatus* success; |
| HiveServerException ex; |
| |
| _ThriftHive_getClusterStatus_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_getQueryPlan_args { |
| public: |
| |
| ThriftHive_getQueryPlan_args() { |
| } |
| |
| virtual ~ThriftHive_getQueryPlan_args() throw() {} |
| |
| |
| bool operator == (const ThriftHive_getQueryPlan_args & /* rhs */) const |
| { |
| return true; |
| } |
| bool operator != (const ThriftHive_getQueryPlan_args &rhs) const { |
| return !(*this == rhs); |
| } |
| |
| bool operator < (const ThriftHive_getQueryPlan_args & ) const; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| |
| class ThriftHive_getQueryPlan_pargs { |
| public: |
| |
| |
| virtual ~ThriftHive_getQueryPlan_pargs() throw() {} |
| |
| |
| uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; |
| |
| }; |
| |
| typedef struct _ThriftHive_getQueryPlan_result__isset { |
| _ThriftHive_getQueryPlan_result__isset() : success(false), ex(false) {} |
| bool success; |
| bool ex; |
| } _ThriftHive_getQueryPlan_result__isset; |
| |
| class ThriftHive_getQueryPlan_result { |
| public: |
| |
| ThriftHive_getQueryPlan_result() { |
| } |
| |
| virtual ~ThriftHive_getQueryPlan_result() throw() {} |
| |
| ::Apache::Hadoop::Hive::QueryPlan success; |
| HiveServerException ex; |
| |
| _ThriftHive_getQueryPlan_result__isset __isset; |
| |
| void __set_success(const ::Apache::Hadoop::Hive::QueryPlan& val) { |
| success = val; |
| } |
| |
| void __set_ex(const HiveServerException& val) { |
| ex = 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; |
| bool ex; |
| } _ThriftHive_getQueryPlan_presult__isset; |
| |
| class ThriftHive_getQueryPlan_presult { |
| public: |
| |
| |
| virtual ~ThriftHive_getQueryPlan_presult() throw() {} |
| |
| ::Apache::Hadoop::Hive::QueryPlan* success; |
| HiveServerException ex; |
| |
| _ThriftHive_getQueryPlan_presult__isset __isset; |
| |
| uint32_t read(::apache::thrift::protocol::TProtocol* iprot); |
| |
| }; |
| |
| |
| class ThriftHive_clean_args { |
| public: |
| |
| 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() { |
| } |
| |
| 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<std::string> & _return, const int32_t numRows); |
| void send_fetchN(const int32_t numRows); |
| void recv_fetchN(std::vector<std::string> & _return); |
| void fetchAll(std::vector<std::string> & _return); |
| void send_fetchAll(); |
| void recv_fetchAll(std::vector<std::string> & _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<ThriftHiveIf> 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<std::string, ProcessFunction> 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<ThriftHiveIf> 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<boost::shared_ptr<ThriftHiveIf> >& ifaces) : ifaces_(ifaces) { |
| std::vector<boost::shared_ptr<ThriftHiveIf> >::iterator iter; |
| for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { |
| ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); |
| } |
| } |
| virtual ~ThriftHiveMultiface() {} |
| protected: |
| std::vector<boost::shared_ptr<ThriftHiveIf> > ifaces_; |
| ThriftHiveMultiface() {} |
| void add(boost::shared_ptr<ThriftHiveIf> 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<std::string> & _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<std::string> & _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(); |
| } |
| |
| }; |
| |
| }}} // namespace |
| |
| #endif |