You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2010/12/09 19:31:09 UTC
svn commit: r1044070 [26/29] - in /hive/trunk: ./ eclipse-templates/ ivy/
lib/ metastore/ metastore/if/ metastore/src/gen-cpp/
metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen-php/ metastore/src/gen-py/hive_metastore/ ...
Added: hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive.h
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive.h?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive.h (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive.h Thu Dec 9 18:30:58 2010
@@ -0,0 +1,1021 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef ThriftHive_H
+#define ThriftHive_H
+
+#include <TProcessor.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;
+};
+
+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;
+ }
+};
+
+typedef struct _ThriftHive_execute_args__isset {
+ _ThriftHive_execute_args__isset() : query(false) {}
+ bool query;
+} _ThriftHive_execute_args__isset;
+
+class ThriftHive_execute_args {
+ public:
+
+ ThriftHive_execute_args() : query("") {
+ }
+
+ virtual ~ThriftHive_execute_args() throw() {}
+
+ std::string query;
+
+ _ThriftHive_execute_args__isset __isset;
+
+ bool operator == (const ThriftHive_execute_args & rhs) const
+ {
+ if (!(query == rhs.query))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_execute_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_execute_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_execute_pargs {
+ public:
+
+
+ virtual ~ThriftHive_execute_pargs() throw() {}
+
+ const std::string* query;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_execute_result__isset {
+ _ThriftHive_execute_result__isset() : ex(false) {}
+ bool ex;
+} _ThriftHive_execute_result__isset;
+
+class ThriftHive_execute_result {
+ public:
+
+ ThriftHive_execute_result() {
+ }
+
+ virtual ~ThriftHive_execute_result() throw() {}
+
+ HiveServerException ex;
+
+ _ThriftHive_execute_result__isset __isset;
+
+ bool operator == (const ThriftHive_execute_result & rhs) const
+ {
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_execute_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_execute_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_execute_presult__isset {
+ _ThriftHive_execute_presult__isset() : ex(false) {}
+ bool ex;
+} _ThriftHive_execute_presult__isset;
+
+class ThriftHive_execute_presult {
+ public:
+
+
+ virtual ~ThriftHive_execute_presult() throw() {}
+
+ HiveServerException ex;
+
+ _ThriftHive_execute_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class ThriftHive_fetchOne_args {
+ public:
+
+ ThriftHive_fetchOne_args() {
+ }
+
+ virtual ~ThriftHive_fetchOne_args() throw() {}
+
+
+ bool operator == (const ThriftHive_fetchOne_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHive_fetchOne_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_fetchOne_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_fetchOne_pargs {
+ public:
+
+
+ virtual ~ThriftHive_fetchOne_pargs() throw() {}
+
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_fetchOne_result__isset {
+ _ThriftHive_fetchOne_result__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_fetchOne_result__isset;
+
+class ThriftHive_fetchOne_result {
+ public:
+
+ ThriftHive_fetchOne_result() : success("") {
+ }
+
+ virtual ~ThriftHive_fetchOne_result() throw() {}
+
+ std::string success;
+ HiveServerException ex;
+
+ _ThriftHive_fetchOne_result__isset __isset;
+
+ bool operator == (const ThriftHive_fetchOne_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_fetchOne_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_fetchOne_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_fetchOne_presult__isset {
+ _ThriftHive_fetchOne_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_fetchOne_presult__isset;
+
+class ThriftHive_fetchOne_presult {
+ public:
+
+
+ virtual ~ThriftHive_fetchOne_presult() throw() {}
+
+ std::string* success;
+ HiveServerException ex;
+
+ _ThriftHive_fetchOne_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHive_fetchN_args__isset {
+ _ThriftHive_fetchN_args__isset() : numRows(false) {}
+ bool numRows;
+} _ThriftHive_fetchN_args__isset;
+
+class ThriftHive_fetchN_args {
+ public:
+
+ ThriftHive_fetchN_args() : numRows(0) {
+ }
+
+ virtual ~ThriftHive_fetchN_args() throw() {}
+
+ int32_t numRows;
+
+ _ThriftHive_fetchN_args__isset __isset;
+
+ bool operator == (const ThriftHive_fetchN_args & rhs) const
+ {
+ if (!(numRows == rhs.numRows))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_fetchN_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_fetchN_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_fetchN_pargs {
+ public:
+
+
+ virtual ~ThriftHive_fetchN_pargs() throw() {}
+
+ const int32_t* numRows;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_fetchN_result__isset {
+ _ThriftHive_fetchN_result__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_fetchN_result__isset;
+
+class ThriftHive_fetchN_result {
+ public:
+
+ ThriftHive_fetchN_result() {
+ }
+
+ virtual ~ThriftHive_fetchN_result() throw() {}
+
+ std::vector<std::string> success;
+ HiveServerException ex;
+
+ _ThriftHive_fetchN_result__isset __isset;
+
+ bool operator == (const ThriftHive_fetchN_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_fetchN_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_fetchN_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_fetchN_presult__isset {
+ _ThriftHive_fetchN_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_fetchN_presult__isset;
+
+class ThriftHive_fetchN_presult {
+ public:
+
+
+ virtual ~ThriftHive_fetchN_presult() throw() {}
+
+ std::vector<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;
+
+ 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;
+
+ bool operator == (const ThriftHive_getSchema_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_getSchema_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getSchema_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getSchema_presult__isset {
+ _ThriftHive_getSchema_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getSchema_presult__isset;
+
+class ThriftHive_getSchema_presult {
+ public:
+
+
+ virtual ~ThriftHive_getSchema_presult() throw() {}
+
+ Apache::Hadoop::Hive::Schema* success;
+ HiveServerException ex;
+
+ _ThriftHive_getSchema_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class ThriftHive_getThriftSchema_args {
+ public:
+
+ ThriftHive_getThriftSchema_args() {
+ }
+
+ virtual ~ThriftHive_getThriftSchema_args() throw() {}
+
+
+ bool operator == (const ThriftHive_getThriftSchema_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHive_getThriftSchema_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getThriftSchema_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_getThriftSchema_pargs {
+ public:
+
+
+ virtual ~ThriftHive_getThriftSchema_pargs() throw() {}
+
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getThriftSchema_result__isset {
+ _ThriftHive_getThriftSchema_result__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getThriftSchema_result__isset;
+
+class ThriftHive_getThriftSchema_result {
+ public:
+
+ ThriftHive_getThriftSchema_result() {
+ }
+
+ virtual ~ThriftHive_getThriftSchema_result() throw() {}
+
+ Apache::Hadoop::Hive::Schema success;
+ HiveServerException ex;
+
+ _ThriftHive_getThriftSchema_result__isset __isset;
+
+ bool operator == (const ThriftHive_getThriftSchema_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_getThriftSchema_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getThriftSchema_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getThriftSchema_presult__isset {
+ _ThriftHive_getThriftSchema_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getThriftSchema_presult__isset;
+
+class ThriftHive_getThriftSchema_presult {
+ public:
+
+
+ virtual ~ThriftHive_getThriftSchema_presult() throw() {}
+
+ Apache::Hadoop::Hive::Schema* success;
+ HiveServerException ex;
+
+ _ThriftHive_getThriftSchema_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class ThriftHive_getClusterStatus_args {
+ public:
+
+ ThriftHive_getClusterStatus_args() {
+ }
+
+ virtual ~ThriftHive_getClusterStatus_args() throw() {}
+
+
+ bool operator == (const ThriftHive_getClusterStatus_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHive_getClusterStatus_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getClusterStatus_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_getClusterStatus_pargs {
+ public:
+
+
+ virtual ~ThriftHive_getClusterStatus_pargs() throw() {}
+
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getClusterStatus_result__isset {
+ _ThriftHive_getClusterStatus_result__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getClusterStatus_result__isset;
+
+class ThriftHive_getClusterStatus_result {
+ public:
+
+ ThriftHive_getClusterStatus_result() {
+ }
+
+ virtual ~ThriftHive_getClusterStatus_result() throw() {}
+
+ HiveClusterStatus success;
+ HiveServerException ex;
+
+ _ThriftHive_getClusterStatus_result__isset __isset;
+
+ bool operator == (const ThriftHive_getClusterStatus_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_getClusterStatus_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getClusterStatus_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getClusterStatus_presult__isset {
+ _ThriftHive_getClusterStatus_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getClusterStatus_presult__isset;
+
+class ThriftHive_getClusterStatus_presult {
+ public:
+
+
+ virtual ~ThriftHive_getClusterStatus_presult() throw() {}
+
+ HiveClusterStatus* success;
+ HiveServerException ex;
+
+ _ThriftHive_getClusterStatus_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
+class ThriftHive_getQueryPlan_args {
+ public:
+
+ ThriftHive_getQueryPlan_args() {
+ }
+
+ virtual ~ThriftHive_getQueryPlan_args() throw() {}
+
+
+ bool operator == (const ThriftHive_getQueryPlan_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHive_getQueryPlan_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getQueryPlan_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHive_getQueryPlan_pargs {
+ public:
+
+
+ virtual ~ThriftHive_getQueryPlan_pargs() throw() {}
+
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getQueryPlan_result__isset {
+ _ThriftHive_getQueryPlan_result__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getQueryPlan_result__isset;
+
+class ThriftHive_getQueryPlan_result {
+ public:
+
+ ThriftHive_getQueryPlan_result() {
+ }
+
+ virtual ~ThriftHive_getQueryPlan_result() throw() {}
+
+ Apache::Hadoop::Hive::QueryPlan success;
+ HiveServerException ex;
+
+ _ThriftHive_getQueryPlan_result__isset __isset;
+
+ bool operator == (const ThriftHive_getQueryPlan_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ex == rhs.ex))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHive_getQueryPlan_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHive_getQueryPlan_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHive_getQueryPlan_presult__isset {
+ _ThriftHive_getQueryPlan_presult__isset() : success(false), ex(false) {}
+ bool success;
+ bool ex;
+} _ThriftHive_getQueryPlan_presult__isset;
+
+class ThriftHive_getQueryPlan_presult {
+ public:
+
+
+ virtual ~ThriftHive_getQueryPlan_presult() throw() {}
+
+ Apache::Hadoop::Hive::QueryPlan* success;
+ HiveServerException ex;
+
+ _ThriftHive_getQueryPlan_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreClient {
+ public:
+ ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
+ Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {}
+ ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) :
+ Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {}
+ boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
+ return piprot_;
+ }
+ boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
+ return poprot_;
+ }
+ void execute(const std::string& query);
+ void send_execute(const std::string& query);
+ void recv_execute();
+ void fetchOne(std::string& _return);
+ void send_fetchOne();
+ void recv_fetchOne(std::string& _return);
+ void fetchN(std::vector<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);
+};
+
+class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor {
+ protected:
+ boost::shared_ptr<ThriftHiveIf> iface_;
+ virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);
+ private:
+ std::map<std::string, void (ThriftHiveProcessor::*)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*)> processMap_;
+ void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ public:
+ ThriftHiveProcessor(boost::shared_ptr<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;
+ }
+
+ virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot);
+ virtual ~ThriftHiveProcessor() {}
+};
+
+class ThriftHiveMultiface : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface {
+ public:
+ ThriftHiveMultiface(std::vector<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) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ ifaces_[i]->execute(query);
+ }
+ }
+
+ void fetchOne(std::string& _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->fetchOne(_return);
+ return;
+ } else {
+ ifaces_[i]->fetchOne(_return);
+ }
+ }
+ }
+
+ void fetchN(std::vector<std::string> & _return, const int32_t numRows) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->fetchN(_return, numRows);
+ return;
+ } else {
+ ifaces_[i]->fetchN(_return, numRows);
+ }
+ }
+ }
+
+ void fetchAll(std::vector<std::string> & _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->fetchAll(_return);
+ return;
+ } else {
+ ifaces_[i]->fetchAll(_return);
+ }
+ }
+ }
+
+ void getSchema(Apache::Hadoop::Hive::Schema& _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->getSchema(_return);
+ return;
+ } else {
+ ifaces_[i]->getSchema(_return);
+ }
+ }
+ }
+
+ void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->getThriftSchema(_return);
+ return;
+ } else {
+ ifaces_[i]->getThriftSchema(_return);
+ }
+ }
+ }
+
+ void getClusterStatus(HiveClusterStatus& _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->getClusterStatus(_return);
+ return;
+ } else {
+ ifaces_[i]->getClusterStatus(_return);
+ }
+ }
+ }
+
+ void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->getQueryPlan(_return);
+ return;
+ } else {
+ ifaces_[i]->getQueryPlan(_return);
+ }
+ }
+ }
+
+};
+
+}}} // namespace
+
+#endif
Added: hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp Thu Dec 9 18:30:58 2010
@@ -0,0 +1,79 @@
+// This autogenerated skeleton file illustrates how to build a server.
+// You should copy it to another filename to avoid overwriting it.
+
+#include "ThriftHive.h"
+#include <protocol/TBinaryProtocol.h>
+#include <server/TSimpleServer.h>
+#include <transport/TServerSocket.h>
+#include <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");
+ }
+
+};
+
+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;
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.cpp Thu Dec 9 18:30:58 2010
@@ -0,0 +1,16 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "hive_service_constants.h"
+
+namespace Apache { namespace Hadoop { namespace Hive {
+
+const hive_serviceConstants g_hive_service_constants;
+
+hive_serviceConstants::hive_serviceConstants() {
+}
+
+}}} // namespace
+
Added: hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.h
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.h?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.h (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_constants.h Thu Dec 9 18:30:58 2010
@@ -0,0 +1,23 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef hive_service_CONSTANTS_H
+#define hive_service_CONSTANTS_H
+
+#include "hive_service_types.h"
+
+namespace Apache { namespace Hadoop { namespace Hive {
+
+class hive_serviceConstants {
+ public:
+ hive_serviceConstants();
+
+};
+
+extern const hive_serviceConstants g_hive_service_constants;
+
+}}} // namespace
+
+#endif
Added: hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.cpp?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.cpp (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.cpp Thu Dec 9 18:30:58 2010
@@ -0,0 +1,197 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "hive_service_types.h"
+
+namespace Apache { namespace Hadoop { namespace Hive {
+
+const char* HiveClusterStatus::ascii_fingerprint = "D514EDCFFC86F64A2E924DCD16D4FAD8";
+const uint8_t HiveClusterStatus::binary_fingerprint[16] = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8};
+
+uint32_t HiveClusterStatus::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->taskTrackers);
+ this->__isset.taskTrackers = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->mapTasks);
+ this->__isset.mapTasks = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->reduceTasks);
+ this->__isset.reduceTasks = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxMapTasks);
+ this->__isset.maxMapTasks = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxReduceTasks);
+ this->__isset.maxReduceTasks = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast0;
+ xfer += iprot->readI32(ecast0);
+ this->state = (JobTrackerState::type)ecast0;
+ this->__isset.state = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t HiveClusterStatus::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("HiveClusterStatus");
+ xfer += oprot->writeFieldBegin("taskTrackers", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32(this->taskTrackers);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("mapTasks", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32(this->mapTasks);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("reduceTasks", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32(this->reduceTasks);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("maxMapTasks", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32(this->maxMapTasks);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("maxReduceTasks", ::apache::thrift::protocol::T_I32, 5);
+ xfer += oprot->writeI32(this->maxReduceTasks);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 6);
+ xfer += oprot->writeI32((int32_t)this->state);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+const char* HiveServerException::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26";
+const uint8_t HiveServerException::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26};
+
+uint32_t HiveServerException::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->message);
+ this->__isset.message = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->errorCode);
+ this->__isset.errorCode = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->SQLState);
+ this->__isset.SQLState = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t HiveServerException::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("HiveServerException");
+ xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->message);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("errorCode", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32(this->errorCode);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("SQLState", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->SQLState);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+}}} // namespace
Added: hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.h
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.h?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.h (added)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/hive_service_types.h Thu Dec 9 18:30:58 2010
@@ -0,0 +1,132 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef hive_service_TYPES_H
+#define hive_service_TYPES_H
+
+#include <Thrift.h>
+#include <TApplicationException.h>
+#include <protocol/TProtocol.h>
+#include <transport/TTransport.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
+ };
+};
+
+typedef struct _HiveClusterStatus__isset {
+ _HiveClusterStatus__isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {}
+ bool taskTrackers;
+ bool mapTasks;
+ bool reduceTasks;
+ bool maxMapTasks;
+ bool maxReduceTasks;
+ bool state;
+} _HiveClusterStatus__isset;
+
+class HiveClusterStatus {
+ public:
+
+ static const char* ascii_fingerprint; // = "D514EDCFFC86F64A2E924DCD16D4FAD8";
+ static const uint8_t binary_fingerprint[16]; // = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8};
+
+ HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0) {
+ }
+
+ virtual ~HiveClusterStatus() throw() {}
+
+ int32_t taskTrackers;
+ int32_t mapTasks;
+ int32_t reduceTasks;
+ int32_t maxMapTasks;
+ int32_t maxReduceTasks;
+ JobTrackerState::type state;
+
+ _HiveClusterStatus__isset __isset;
+
+ bool operator == (const HiveClusterStatus & rhs) const
+ {
+ if (!(taskTrackers == rhs.taskTrackers))
+ return false;
+ if (!(mapTasks == rhs.mapTasks))
+ return false;
+ if (!(reduceTasks == rhs.reduceTasks))
+ return false;
+ if (!(maxMapTasks == rhs.maxMapTasks))
+ return false;
+ if (!(maxReduceTasks == rhs.maxReduceTasks))
+ return false;
+ if (!(state == rhs.state))
+ return false;
+ return true;
+ }
+ bool operator != (const HiveClusterStatus &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const HiveClusterStatus & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _HiveServerException__isset {
+ _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {}
+ bool message;
+ bool errorCode;
+ bool SQLState;
+} _HiveServerException__isset;
+
+class HiveServerException : public ::apache::thrift::TException {
+ public:
+
+ static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26";
+ static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26};
+
+ HiveServerException() : message(""), errorCode(0), SQLState("") {
+ }
+
+ virtual ~HiveServerException() throw() {}
+
+ std::string message;
+ int32_t errorCode;
+ std::string SQLState;
+
+ _HiveServerException__isset __isset;
+
+ bool operator == (const HiveServerException & rhs) const
+ {
+ if (!(message == rhs.message))
+ return false;
+ if (!(errorCode == rhs.errorCode))
+ return false;
+ if (!(SQLState == rhs.SQLState))
+ return false;
+ return true;
+ }
+ bool operator != (const HiveServerException &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const HiveServerException & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+}}} // namespace
+
+#endif
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java Thu Dec 9 18:30:58 2010
@@ -0,0 +1,736 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.service;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class HiveClusterStatus implements TBase<HiveClusterStatus, HiveClusterStatus._Fields>, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("HiveClusterStatus");
+
+ private static final TField TASK_TRACKERS_FIELD_DESC = new TField("taskTrackers", TType.I32, (short)1);
+ private static final TField MAP_TASKS_FIELD_DESC = new TField("mapTasks", TType.I32, (short)2);
+ private static final TField REDUCE_TASKS_FIELD_DESC = new TField("reduceTasks", TType.I32, (short)3);
+ private static final TField MAX_MAP_TASKS_FIELD_DESC = new TField("maxMapTasks", TType.I32, (short)4);
+ private static final TField MAX_REDUCE_TASKS_FIELD_DESC = new TField("maxReduceTasks", TType.I32, (short)5);
+ private static final TField STATE_FIELD_DESC = new TField("state", TType.I32, (short)6);
+
+ private int taskTrackers;
+ private int mapTasks;
+ private int reduceTasks;
+ private int maxMapTasks;
+ private int maxReduceTasks;
+ private JobTrackerState state;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ TASK_TRACKERS((short)1, "taskTrackers"),
+ MAP_TASKS((short)2, "mapTasks"),
+ REDUCE_TASKS((short)3, "reduceTasks"),
+ MAX_MAP_TASKS((short)4, "maxMapTasks"),
+ MAX_REDUCE_TASKS((short)5, "maxReduceTasks"),
+ /**
+ *
+ * @see JobTrackerState
+ */
+ STATE((short)6, "state");
+
+ private static final Map<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 BitSet __isset_bit_vector = new BitSet(5);
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TASK_TRACKERS, new FieldMetaData("taskTrackers", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.MAP_TASKS, new FieldMetaData("mapTasks", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.REDUCE_TASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.MAX_MAP_TASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.MAX_REDUCE_TASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT,
+ new EnumMetaData(TType.ENUM, JobTrackerState.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap);
+ }
+
+ public HiveClusterStatus() {
+ }
+
+ public HiveClusterStatus(
+ int taskTrackers,
+ int mapTasks,
+ int reduceTasks,
+ int maxMapTasks,
+ int maxReduceTasks,
+ JobTrackerState state)
+ {
+ this();
+ this.taskTrackers = taskTrackers;
+ setTaskTrackersIsSet(true);
+ this.mapTasks = mapTasks;
+ setMapTasksIsSet(true);
+ this.reduceTasks = reduceTasks;
+ setReduceTasksIsSet(true);
+ this.maxMapTasks = maxMapTasks;
+ setMaxMapTasksIsSet(true);
+ this.maxReduceTasks = maxReduceTasks;
+ setMaxReduceTasksIsSet(true);
+ this.state = state;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public HiveClusterStatus(HiveClusterStatus other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.taskTrackers = other.taskTrackers;
+ this.mapTasks = other.mapTasks;
+ this.reduceTasks = other.reduceTasks;
+ this.maxMapTasks = other.maxMapTasks;
+ this.maxReduceTasks = other.maxReduceTasks;
+ if (other.isSetState()) {
+ this.state = other.state;
+ }
+ }
+
+ public HiveClusterStatus deepCopy() {
+ return new HiveClusterStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ setTaskTrackersIsSet(false);
+ this.taskTrackers = 0;
+ setMapTasksIsSet(false);
+ this.mapTasks = 0;
+ setReduceTasksIsSet(false);
+ this.reduceTasks = 0;
+ setMaxMapTasksIsSet(false);
+ this.maxMapTasks = 0;
+ setMaxReduceTasksIsSet(false);
+ this.maxReduceTasks = 0;
+ this.state = null;
+ }
+
+ public int getTaskTrackers() {
+ return this.taskTrackers;
+ }
+
+ public void setTaskTrackers(int taskTrackers) {
+ this.taskTrackers = taskTrackers;
+ setTaskTrackersIsSet(true);
+ }
+
+ public void unsetTaskTrackers() {
+ __isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID);
+ }
+
+ /** Returns true if field taskTrackers is set (has been asigned a value) and false otherwise */
+ public boolean isSetTaskTrackers() {
+ return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID);
+ }
+
+ public void setTaskTrackersIsSet(boolean value) {
+ __isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value);
+ }
+
+ public int getMapTasks() {
+ return this.mapTasks;
+ }
+
+ public void setMapTasks(int mapTasks) {
+ this.mapTasks = mapTasks;
+ setMapTasksIsSet(true);
+ }
+
+ public void unsetMapTasks() {
+ __isset_bit_vector.clear(__MAPTASKS_ISSET_ID);
+ }
+
+ /** Returns true if field mapTasks is set (has been asigned a value) and false otherwise */
+ public boolean isSetMapTasks() {
+ return __isset_bit_vector.get(__MAPTASKS_ISSET_ID);
+ }
+
+ public void setMapTasksIsSet(boolean value) {
+ __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value);
+ }
+
+ public int getReduceTasks() {
+ return this.reduceTasks;
+ }
+
+ public void setReduceTasks(int reduceTasks) {
+ this.reduceTasks = reduceTasks;
+ setReduceTasksIsSet(true);
+ }
+
+ public void unsetReduceTasks() {
+ __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID);
+ }
+
+ /** Returns true if field reduceTasks is set (has been asigned a value) and false otherwise */
+ public boolean isSetReduceTasks() {
+ return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID);
+ }
+
+ public void setReduceTasksIsSet(boolean value) {
+ __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value);
+ }
+
+ public int getMaxMapTasks() {
+ return this.maxMapTasks;
+ }
+
+ public void setMaxMapTasks(int maxMapTasks) {
+ this.maxMapTasks = maxMapTasks;
+ setMaxMapTasksIsSet(true);
+ }
+
+ public void unsetMaxMapTasks() {
+ __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID);
+ }
+
+ /** Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise */
+ public boolean isSetMaxMapTasks() {
+ return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID);
+ }
+
+ public void setMaxMapTasksIsSet(boolean value) {
+ __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value);
+ }
+
+ public int getMaxReduceTasks() {
+ return this.maxReduceTasks;
+ }
+
+ public void setMaxReduceTasks(int maxReduceTasks) {
+ this.maxReduceTasks = maxReduceTasks;
+ setMaxReduceTasksIsSet(true);
+ }
+
+ public void unsetMaxReduceTasks() {
+ __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID);
+ }
+
+ /** Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise */
+ public boolean isSetMaxReduceTasks() {
+ return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID);
+ }
+
+ public void setMaxReduceTasksIsSet(boolean value) {
+ __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see JobTrackerState
+ */
+ public JobTrackerState getState() {
+ return this.state;
+ }
+
+ /**
+ *
+ * @see JobTrackerState
+ */
+ public void setState(JobTrackerState state) {
+ this.state = state;
+ }
+
+ public void unsetState() {
+ this.state = null;
+ }
+
+ /** Returns true if field state is set (has been asigned a value) and false otherwise */
+ public boolean isSetState() {
+ return this.state != null;
+ }
+
+ public void setStateIsSet(boolean value) {
+ if (!value) {
+ this.state = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TASK_TRACKERS:
+ if (value == null) {
+ unsetTaskTrackers();
+ } else {
+ setTaskTrackers((Integer)value);
+ }
+ break;
+
+ case MAP_TASKS:
+ if (value == null) {
+ unsetMapTasks();
+ } else {
+ setMapTasks((Integer)value);
+ }
+ break;
+
+ case REDUCE_TASKS:
+ if (value == null) {
+ unsetReduceTasks();
+ } else {
+ setReduceTasks((Integer)value);
+ }
+ break;
+
+ case MAX_MAP_TASKS:
+ if (value == null) {
+ unsetMaxMapTasks();
+ } else {
+ setMaxMapTasks((Integer)value);
+ }
+ break;
+
+ case MAX_REDUCE_TASKS:
+ if (value == null) {
+ unsetMaxReduceTasks();
+ } else {
+ setMaxReduceTasks((Integer)value);
+ }
+ break;
+
+ case STATE:
+ if (value == null) {
+ unsetState();
+ } else {
+ setState((JobTrackerState)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TASK_TRACKERS:
+ return new Integer(getTaskTrackers());
+
+ case MAP_TASKS:
+ return new Integer(getMapTasks());
+
+ case REDUCE_TASKS:
+ return new Integer(getReduceTasks());
+
+ case MAX_MAP_TASKS:
+ return new Integer(getMaxMapTasks());
+
+ case MAX_REDUCE_TASKS:
+ return new Integer(getMaxReduceTasks());
+
+ case STATE:
+ return getState();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TASK_TRACKERS:
+ return isSetTaskTrackers();
+ case MAP_TASKS:
+ return isSetMapTasks();
+ case REDUCE_TASKS:
+ return isSetReduceTasks();
+ case MAX_MAP_TASKS:
+ return isSetMaxMapTasks();
+ case MAX_REDUCE_TASKS:
+ return isSetMaxReduceTasks();
+ case STATE:
+ return isSetState();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof HiveClusterStatus)
+ return this.equals((HiveClusterStatus)that);
+ return false;
+ }
+
+ public boolean equals(HiveClusterStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_taskTrackers = true;
+ boolean that_present_taskTrackers = true;
+ if (this_present_taskTrackers || that_present_taskTrackers) {
+ if (!(this_present_taskTrackers && that_present_taskTrackers))
+ return false;
+ if (this.taskTrackers != that.taskTrackers)
+ return false;
+ }
+
+ boolean this_present_mapTasks = true;
+ boolean that_present_mapTasks = true;
+ if (this_present_mapTasks || that_present_mapTasks) {
+ if (!(this_present_mapTasks && that_present_mapTasks))
+ return false;
+ if (this.mapTasks != that.mapTasks)
+ return false;
+ }
+
+ boolean this_present_reduceTasks = true;
+ boolean that_present_reduceTasks = true;
+ if (this_present_reduceTasks || that_present_reduceTasks) {
+ if (!(this_present_reduceTasks && that_present_reduceTasks))
+ return false;
+ if (this.reduceTasks != that.reduceTasks)
+ return false;
+ }
+
+ boolean this_present_maxMapTasks = true;
+ boolean that_present_maxMapTasks = true;
+ if (this_present_maxMapTasks || that_present_maxMapTasks) {
+ if (!(this_present_maxMapTasks && that_present_maxMapTasks))
+ return false;
+ if (this.maxMapTasks != that.maxMapTasks)
+ return false;
+ }
+
+ boolean this_present_maxReduceTasks = true;
+ boolean that_present_maxReduceTasks = true;
+ if (this_present_maxReduceTasks || that_present_maxReduceTasks) {
+ if (!(this_present_maxReduceTasks && that_present_maxReduceTasks))
+ return false;
+ if (this.maxReduceTasks != that.maxReduceTasks)
+ return false;
+ }
+
+ boolean this_present_state = true && this.isSetState();
+ boolean that_present_state = true && that.isSetState();
+ if (this_present_state || that_present_state) {
+ if (!(this_present_state && that_present_state))
+ return false;
+ if (!this.state.equals(that.state))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(HiveClusterStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ HiveClusterStatus typedOther = (HiveClusterStatus)other;
+
+ lastComparison = Boolean.valueOf(isSetTaskTrackers()).compareTo(typedOther.isSetTaskTrackers());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTaskTrackers()) {
+ lastComparison = TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(typedOther.isSetMapTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMapTasks()) {
+ lastComparison = TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(typedOther.isSetReduceTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReduceTasks()) {
+ lastComparison = TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(typedOther.isSetMaxMapTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxMapTasks()) {
+ lastComparison = TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(typedOther.isSetMaxReduceTasks());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxReduceTasks()) {
+ lastComparison = TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetState()) {
+ lastComparison = TBaseHelper.compareTo(this.state, typedOther.state);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // TASK_TRACKERS
+ if (field.type == TType.I32) {
+ this.taskTrackers = iprot.readI32();
+ setTaskTrackersIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // MAP_TASKS
+ if (field.type == TType.I32) {
+ this.mapTasks = iprot.readI32();
+ setMapTasksIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // REDUCE_TASKS
+ if (field.type == TType.I32) {
+ this.reduceTasks = iprot.readI32();
+ setReduceTasksIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 4: // MAX_MAP_TASKS
+ if (field.type == TType.I32) {
+ this.maxMapTasks = iprot.readI32();
+ setMaxMapTasksIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 5: // MAX_REDUCE_TASKS
+ if (field.type == TType.I32) {
+ this.maxReduceTasks = iprot.readI32();
+ setMaxReduceTasksIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 6: // STATE
+ if (field.type == TType.I32) {
+ this.state = JobTrackerState.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC);
+ oprot.writeI32(this.taskTrackers);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC);
+ oprot.writeI32(this.mapTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC);
+ oprot.writeI32(this.reduceTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC);
+ oprot.writeI32(this.maxMapTasks);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC);
+ oprot.writeI32(this.maxReduceTasks);
+ oprot.writeFieldEnd();
+ if (this.state != null) {
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
+ oprot.writeI32(this.state.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("HiveClusterStatus(");
+ boolean first = true;
+
+ sb.append("taskTrackers:");
+ sb.append(this.taskTrackers);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("mapTasks:");
+ sb.append(this.mapTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("reduceTasks:");
+ sb.append(this.reduceTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("maxMapTasks:");
+ sb.append(this.maxMapTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("maxReduceTasks:");
+ sb.append(this.maxReduceTasks);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("state:");
+ if (this.state == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.state);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java Thu Dec 9 18:30:58 2010
@@ -0,0 +1,480 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.service;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class HiveServerException extends Exception implements TBase<HiveServerException, HiveServerException._Fields>, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("HiveServerException");
+
+ private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+ private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.I32, (short)2);
+ private static final TField SQLSTATE_FIELD_DESC = new TField("SQLState", TType.STRING, (short)3);
+
+ private String message;
+ private int errorCode;
+ private String SQLState;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ MESSAGE((short)1, "message"),
+ ERROR_CODE((short)2, "errorCode"),
+ SQLSTATE((short)3, "SQLState");
+
+ private static final Map<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: // MESSAGE
+ return MESSAGE;
+ case 2: // ERROR_CODE
+ return ERROR_CODE;
+ case 3: // SQLSTATE
+ return SQLSTATE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __ERRORCODE_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMap.put(_Fields.SQLSTATE, new FieldMetaData("SQLState", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(HiveServerException.class, metaDataMap);
+ }
+
+ public HiveServerException() {
+ }
+
+ public HiveServerException(
+ String message,
+ int errorCode,
+ String SQLState)
+ {
+ this();
+ this.message = message;
+ this.errorCode = errorCode;
+ setErrorCodeIsSet(true);
+ this.SQLState = SQLState;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public HiveServerException(HiveServerException other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ this.errorCode = other.errorCode;
+ if (other.isSetSQLState()) {
+ this.SQLState = other.SQLState;
+ }
+ }
+
+ public HiveServerException deepCopy() {
+ return new HiveServerException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ setErrorCodeIsSet(false);
+ this.errorCode = 0;
+ this.SQLState = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been asigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public int getErrorCode() {
+ return this.errorCode;
+ }
+
+ public void setErrorCode(int errorCode) {
+ this.errorCode = errorCode;
+ setErrorCodeIsSet(true);
+ }
+
+ public void unsetErrorCode() {
+ __isset_bit_vector.clear(__ERRORCODE_ISSET_ID);
+ }
+
+ /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */
+ public boolean isSetErrorCode() {
+ return __isset_bit_vector.get(__ERRORCODE_ISSET_ID);
+ }
+
+ public void setErrorCodeIsSet(boolean value) {
+ __isset_bit_vector.set(__ERRORCODE_ISSET_ID, value);
+ }
+
+ public String getSQLState() {
+ return this.SQLState;
+ }
+
+ public void setSQLState(String SQLState) {
+ this.SQLState = SQLState;
+ }
+
+ public void unsetSQLState() {
+ this.SQLState = null;
+ }
+
+ /** Returns true if field SQLState is set (has been asigned a value) and false otherwise */
+ public boolean isSetSQLState() {
+ return this.SQLState != null;
+ }
+
+ public void setSQLStateIsSet(boolean value) {
+ if (!value) {
+ this.SQLState = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ case ERROR_CODE:
+ if (value == null) {
+ unsetErrorCode();
+ } else {
+ setErrorCode((Integer)value);
+ }
+ break;
+
+ case SQLSTATE:
+ if (value == null) {
+ unsetSQLState();
+ } else {
+ setSQLState((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ case ERROR_CODE:
+ return new Integer(getErrorCode());
+
+ case SQLSTATE:
+ return getSQLState();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case MESSAGE:
+ return isSetMessage();
+ case ERROR_CODE:
+ return isSetErrorCode();
+ case SQLSTATE:
+ return isSetSQLState();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof HiveServerException)
+ return this.equals((HiveServerException)that);
+ return false;
+ }
+
+ public boolean equals(HiveServerException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ boolean this_present_errorCode = true;
+ boolean that_present_errorCode = true;
+ if (this_present_errorCode || that_present_errorCode) {
+ if (!(this_present_errorCode && that_present_errorCode))
+ return false;
+ if (this.errorCode != that.errorCode)
+ return false;
+ }
+
+ boolean this_present_SQLState = true && this.isSetSQLState();
+ boolean that_present_SQLState = true && that.isSetSQLState();
+ if (this_present_SQLState || that_present_SQLState) {
+ if (!(this_present_SQLState && that_present_SQLState))
+ return false;
+ if (!this.SQLState.equals(that.SQLState))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(HiveServerException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ HiveServerException typedOther = (HiveServerException)other;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = TBaseHelper.compareTo(this.message, typedOther.message);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErrorCode()) {
+ lastComparison = TBaseHelper.compareTo(this.errorCode, typedOther.errorCode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSQLState()).compareTo(typedOther.isSetSQLState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSQLState()) {
+ lastComparison = TBaseHelper.compareTo(this.SQLState, typedOther.SQLState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // MESSAGE
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // ERROR_CODE
+ if (field.type == TType.I32) {
+ this.errorCode = iprot.readI32();
+ setErrorCodeIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // SQLSTATE
+ if (field.type == TType.STRING) {
+ this.SQLState = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
+ oprot.writeI32(this.errorCode);
+ oprot.writeFieldEnd();
+ if (this.SQLState != null) {
+ oprot.writeFieldBegin(SQLSTATE_FIELD_DESC);
+ oprot.writeString(this.SQLState);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("HiveServerException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("errorCode:");
+ sb.append(this.errorCode);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("SQLState:");
+ if (this.SQLState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.SQLState);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java Thu Dec 9 18:30:58 2010
@@ -0,0 +1,44 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.service;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum JobTrackerState implements TEnum {
+ INITIALIZING(1),
+ RUNNING(2);
+
+ private final int value;
+
+ private JobTrackerState(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static JobTrackerState findByValue(int value) {
+ switch (value) {
+ case 1:
+ return INITIALIZING;
+ case 2:
+ return RUNNING;
+ default:
+ return null;
+ }
+ }
+}