FAQ
http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/ThriftHive.h
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/ThriftHive.h b/service/src/gen/thrift/gen-cpp/ThriftHive.h
new file mode 100644
index 0000000..902bd4b
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/ThriftHive.h
@@ -0,0 +1,1224 @@
+/**
+ * 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 <thrift/TDispatchProcessor.h>
+#include <thrift/async/TConcurrentClientSyncInfo.h>
+#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<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 :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<std::string> success;
+ HiveServerException ex;
+
+ _ThriftHive_fetchN_result__isset __isset;
+
+ void __set_success(const std::vector<std::string> & 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<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(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<std::string> success;
+ HiveServerException ex;
+
+ _ThriftHive_fetchAll_result__isset __isset;
+
+ void __set_success(const std::vector<std::string> & 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<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(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<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();
+ }
+
+};
+
+// 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<std::string> & _return, const int32_t numRows);
+ int32_t send_fetchN(const int32_t numRows);
+ void recv_fetchN(std::vector<std::string> & _return, const int32_t seqid);
+ void fetchAll(std::vector<std::string> & _return);
+ int32_t send_fetchAll();
+ void recv_fetchAll(std::vector<std::string> & _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

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp b/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
new file mode 100644
index 0000000..3b61b76
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
@@ -0,0 +1,84 @@
+// 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 <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/server/TSimpleServer.h>
+#include <thrift/transport/TServerSocket.h>
+#include <thrift/transport/TBufferTransports.h>
+
+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<std::string> & _return, const int32_t numRows) {
+ // Your implementation goes here
+ printf("fetchN\n");
+ }
+
+ void fetchAll(std::vector<std::string> & _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<ThriftHiveHandler> handler(new ThriftHiveHandler());
+ shared_ptr<TProcessor> processor(new ThriftHiveProcessor(handler));
+ shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
+ shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+ shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+
+ TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+ server.serve();
+ return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp b/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
new file mode 100644
index 0000000..e2bbe71
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
@@ -0,0 +1,17 @@
+/**
+ * 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
+

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/hive_service_constants.h
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/hive_service_constants.h b/service/src/gen/thrift/gen-cpp/hive_service_constants.h
new file mode 100644
index 0000000..e0887f4
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/hive_service_constants.h
@@ -0,0 +1,24 @@
+/**
+ * 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

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/hive_service_types.cpp
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/hive_service_types.cpp b/service/src/gen/thrift/gen-cpp/hive_service_types.cpp
new file mode 100644
index 0000000..9ddf7c1
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/hive_service_types.cpp
@@ -0,0 +1,351 @@
+/**
+ * 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 <algorithm>
+#include <ostream>
+
+#include <thrift/TToString.h>
+
+namespace Apache { namespace Hadoop { namespace Hive {
+
+int _kJobTrackerStateValues[] = {
+ JobTrackerState::INITIALIZING,
+ JobTrackerState::RUNNING
+};
+const char* _kJobTrackerStateNames[] = {
+ "INITIALIZING",
+ "RUNNING"
+};
+const std::map<int, const char*> _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

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-cpp/hive_service_types.h
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-cpp/hive_service_types.h b/service/src/gen/thrift/gen-cpp/hive_service_types.h
new file mode 100644
index 0000000..266f8ea
--- /dev/null
+++ b/service/src/gen/thrift/gen-cpp/hive_service_types.h
@@ -0,0 +1,176 @@
+/**
+ * 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 <iosfwd>
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+#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<int, const char*> _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

http://git-wip-us.apache.org/repos/asf/hive/blob/a28f6cd8/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
----------------------------------------------------------------------
diff --git a/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java b/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
new file mode 100644
index 0000000..ad89867
--- /dev/null
+++ b/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
@@ -0,0 +1,901 @@
+/**
+ * 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<HiveClusterStatus, HiveClusterStatus._Fields>, java.io.Serializable, Cloneable, Comparable<HiveClusterStatus> {
+ 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.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 <i>other</i>.
+ */
+ 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<Object> list = new ArrayList<Object>();
+
+ boolean present_taskTrackers = true;
+ list.add(present_taskTrackers);
+ if (present_taskTrackers)
+ list.add(taskTrackers);
+
+ boolean present_mapTasks = true;
+ list.add(present_mapTasks);
+ if (present_mapTasks)
+ list.add(mapTasks);
+
+ boolean present_reduceTasks = true;
+ list.add(present_reduceTasks);
+ if (present_reduceTasks)
+ list.add(reduceTasks);
+
+ boolean present_maxMapTasks = true;
+ list.add(present_maxMapTasks);
+ if (present_maxMapTasks)
+ list.add(maxMapTasks);
+
+ boolean present_maxReduceTasks = true;
+ list.add(present_maxReduceTasks);
+ if (present_maxReduceTasks)
+ list.add(maxReduceTasks);
+
+ boolean present_state = true && (isSetState());
+ list.add(present_state);
+ if (present_state)
+ list.add(state.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(HiveClusterStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTaskTrackers()).compareTo(other.isSetTaskTrackers());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskTrackers()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskTrackers, other.taskTrackers);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(other.isSetMapTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMapTasks()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapTasks, other.mapTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(other.isSetReduceTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReduceTasks()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reduceTasks, other.reduceTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(other.isSetMaxMapTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxMapTasks()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMapTasks, other.maxMapTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(other.isSetMaxReduceTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxReduceTasks()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxReduceTasks, other.maxReduceTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("HiveClusterStatus(");
+ boolean first = true;
+
+ sb.append("taskTrackers:");
+ sb.append(this.taskTrackers);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("mapTasks:");
+ sb.append(this.mapTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("reduceTasks:");
+ sb.append(this.reduceTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("maxMapTasks:");
+ sb.append(this.maxMapTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("maxReduceTasks:");
+ sb.append(this.maxReduceTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("state:");
+ if (this.state == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.state);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class HiveClusterStatusStandardSchemeFactory implements SchemeFactory {
+ public HiveClusterStatusStandardScheme getScheme() {
+ return new HiveClusterStatusStandardScheme();
+ }
+ }
+
+ private static class HiveClusterStatusStandardScheme extends StandardScheme<HiveClusterStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, HiveClusterStatus struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TASK_TRACKERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.taskTrackers = iprot.readI32();
+ struct.setTaskTrackersIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MAP_TASKS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.mapTasks = iprot.readI32();
+ struct.setMapTasksIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // REDUCE_TASKS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.reduceTasks = iprot.readI32();
+ struct.setReduceTasksIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // MAX_MAP_TASKS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxMapTasks = iprot.readI32();
+ struct.setMaxMapTasksIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // MAX_REDUCE_TASKS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxReduceTasks = iprot.readI32();
+ struct.setMaxReduceTasksIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.state = org.apache.hadoop.hive.service.JobTrackerState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, HiveClusterStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC);
+ oprot.writeI32(struct.taskTrackers);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC);
+ oprot.writeI32(struct.mapTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC);
+ oprot.writeI32(struct.reduceTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC);
+ oprot.writeI32(struct.maxMapTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC);
+ oprot.writeI32(struct.maxReduceTasks);
+ oprot.writeFieldEnd();
+ if (struct.state != null) {
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
+ oprot.writeI32(struct.state.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class HiveClusterStatusTupleSchemeFactory implements SchemeFactory {
+ public HiveClusterStatusTupleScheme getScheme() {
+ return new HiveClusterStatusTupleScheme();
+ }
+ }
+
+ private static class HiveClusterStatusTupleScheme extends TupleScheme<HiveClusterStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetTaskTrackers()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMapTasks()) {
+ optionals.set(1);
+ }
+ if (struct.isSetReduceTasks()) {
+ optionals.set(2);
+ }
+ if (struct.isSetMaxMapTasks()) {
+ optionals.set(3);
+ }
+ if (struct.isSetMaxReduceTasks()) {
+ optionals.set(4);
+ }
+ if (struct.isSetState()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetTaskTrackers()) {
+ oprot.writeI32(struct.taskTrackers);
+ }
+ if (struct.isSetMapTasks()) {
+ oprot.writeI32(struct.mapTasks);
+ }
+ if (struct.isSetReduceTasks()) {
+ oprot.writeI32(struct.reduceTasks);
+ }
+ if (struct.isSetMaxMapTasks()) {
+ oprot.writeI32(struct.maxMapTasks);
+ }
+ if (struct.isSetMaxReduceTasks()) {
+ oprot.writeI32(struct.maxReduceTasks);
+ }
+ if (struct.isSetState()) {
+ oprot.writeI32(struct.state.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.taskTrackers = iprot.readI32();
+ struct.setTaskTrackersIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.mapTasks = iprot.readI32();
+ struct.setMapTasksIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.reduceTasks = iprot.readI32();
+ struct.setReduceTasksIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.maxMapTasks = iprot.readI32();
+ struct.setMaxMapTasksIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.maxReduceTasks = iprot.readI32();
+ struct.setMaxReduceTasksIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.state = org.apache.hadoop.hive.service.JobTrackerState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ }
+ }
+ }
+
+}
+

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 12 of 51 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 8, '16 at 2:03a
activeJan 8, '16 at 2:03a
posts51
users1
websitehive.apache.org

1 user in discussion

Vgumashta: 51 posts

People

Translate

site design / logo © 2021 Grokbase