You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/02/20 00:50:34 UTC
svn commit: r1569985 [3/8] - in /hive/trunk:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/
itests/util/src/main/java/org/apache/hadoop/hive/ql/ metastore/if/
metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org...
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h Wed Feb 19 23:50:32 2014
@@ -89,6 +89,11 @@ class ThriftHiveMetastoreIf : virtual pu
virtual void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) = 0;
virtual bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0;
virtual bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0;
+ virtual void create_function(const Function& func) = 0;
+ virtual void drop_function(const std::string& dbName, const std::string& funcName) = 0;
+ virtual void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) = 0;
+ virtual void get_functions(std::vector<std::string> & _return, const std::string& dbName, const std::string& pattern) = 0;
+ virtual void get_function(Function& _return, const std::string& dbName, const std::string& funcName) = 0;
virtual bool create_role(const Role& role) = 0;
virtual bool drop_role(const std::string& role_name) = 0;
virtual void get_role_names(std::vector<std::string> & _return) = 0;
@@ -365,6 +370,21 @@ class ThriftHiveMetastoreNull : virtual
bool _return = false;
return _return;
}
+ void create_function(const Function& /* func */) {
+ return;
+ }
+ void drop_function(const std::string& /* dbName */, const std::string& /* funcName */) {
+ return;
+ }
+ void alter_function(const std::string& /* dbName */, const std::string& /* funcName */, const Function& /* newFunc */) {
+ return;
+ }
+ void get_functions(std::vector<std::string> & /* _return */, const std::string& /* dbName */, const std::string& /* pattern */) {
+ return;
+ }
+ void get_function(Function& /* _return */, const std::string& /* dbName */, const std::string& /* funcName */) {
+ return;
+ }
bool create_role(const Role& /* role */) {
bool _return = false;
return _return;
@@ -11013,6 +11033,671 @@ class ThriftHiveMetastore_delete_table_c
};
+typedef struct _ThriftHiveMetastore_create_function_args__isset {
+ _ThriftHiveMetastore_create_function_args__isset() : func(false) {}
+ bool func;
+} _ThriftHiveMetastore_create_function_args__isset;
+
+class ThriftHiveMetastore_create_function_args {
+ public:
+
+ ThriftHiveMetastore_create_function_args() {
+ }
+
+ virtual ~ThriftHiveMetastore_create_function_args() throw() {}
+
+ Function func;
+
+ _ThriftHiveMetastore_create_function_args__isset __isset;
+
+ void __set_func(const Function& val) {
+ func = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_create_function_args & rhs) const
+ {
+ if (!(func == rhs.func))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_create_function_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_create_function_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_create_function_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_create_function_pargs() throw() {}
+
+ const Function* func;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_create_function_result__isset {
+ _ThriftHiveMetastore_create_function_result__isset() : o1(false), o2(false), o3(false), o4(false) {}
+ bool o1;
+ bool o2;
+ bool o3;
+ bool o4;
+} _ThriftHiveMetastore_create_function_result__isset;
+
+class ThriftHiveMetastore_create_function_result {
+ public:
+
+ ThriftHiveMetastore_create_function_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_create_function_result() throw() {}
+
+ AlreadyExistsException o1;
+ InvalidObjectException o2;
+ MetaException o3;
+ NoSuchObjectException o4;
+
+ _ThriftHiveMetastore_create_function_result__isset __isset;
+
+ void __set_o1(const AlreadyExistsException& val) {
+ o1 = val;
+ }
+
+ void __set_o2(const InvalidObjectException& val) {
+ o2 = val;
+ }
+
+ void __set_o3(const MetaException& val) {
+ o3 = val;
+ }
+
+ void __set_o4(const NoSuchObjectException& val) {
+ o4 = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_create_function_result & rhs) const
+ {
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o2 == rhs.o2))
+ return false;
+ if (!(o3 == rhs.o3))
+ return false;
+ if (!(o4 == rhs.o4))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_create_function_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_create_function_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_create_function_presult__isset {
+ _ThriftHiveMetastore_create_function_presult__isset() : o1(false), o2(false), o3(false), o4(false) {}
+ bool o1;
+ bool o2;
+ bool o3;
+ bool o4;
+} _ThriftHiveMetastore_create_function_presult__isset;
+
+class ThriftHiveMetastore_create_function_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_create_function_presult() throw() {}
+
+ AlreadyExistsException o1;
+ InvalidObjectException o2;
+ MetaException o3;
+ NoSuchObjectException o4;
+
+ _ThriftHiveMetastore_create_function_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_drop_function_args__isset {
+ _ThriftHiveMetastore_drop_function_args__isset() : dbName(false), funcName(false) {}
+ bool dbName;
+ bool funcName;
+} _ThriftHiveMetastore_drop_function_args__isset;
+
+class ThriftHiveMetastore_drop_function_args {
+ public:
+
+ ThriftHiveMetastore_drop_function_args() : dbName(), funcName() {
+ }
+
+ virtual ~ThriftHiveMetastore_drop_function_args() throw() {}
+
+ std::string dbName;
+ std::string funcName;
+
+ _ThriftHiveMetastore_drop_function_args__isset __isset;
+
+ void __set_dbName(const std::string& val) {
+ dbName = val;
+ }
+
+ void __set_funcName(const std::string& val) {
+ funcName = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_drop_function_args & rhs) const
+ {
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(funcName == rhs.funcName))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_drop_function_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_drop_function_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_drop_function_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_drop_function_pargs() throw() {}
+
+ const std::string* dbName;
+ const std::string* funcName;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_drop_function_result__isset {
+ _ThriftHiveMetastore_drop_function_result__isset() : o1(false), o3(false) {}
+ bool o1;
+ bool o3;
+} _ThriftHiveMetastore_drop_function_result__isset;
+
+class ThriftHiveMetastore_drop_function_result {
+ public:
+
+ ThriftHiveMetastore_drop_function_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_drop_function_result() throw() {}
+
+ NoSuchObjectException o1;
+ MetaException o3;
+
+ _ThriftHiveMetastore_drop_function_result__isset __isset;
+
+ void __set_o1(const NoSuchObjectException& val) {
+ o1 = val;
+ }
+
+ void __set_o3(const MetaException& val) {
+ o3 = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_drop_function_result & rhs) const
+ {
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o3 == rhs.o3))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_drop_function_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_drop_function_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_drop_function_presult__isset {
+ _ThriftHiveMetastore_drop_function_presult__isset() : o1(false), o3(false) {}
+ bool o1;
+ bool o3;
+} _ThriftHiveMetastore_drop_function_presult__isset;
+
+class ThriftHiveMetastore_drop_function_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_drop_function_presult() throw() {}
+
+ NoSuchObjectException o1;
+ MetaException o3;
+
+ _ThriftHiveMetastore_drop_function_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_alter_function_args__isset {
+ _ThriftHiveMetastore_alter_function_args__isset() : dbName(false), funcName(false), newFunc(false) {}
+ bool dbName;
+ bool funcName;
+ bool newFunc;
+} _ThriftHiveMetastore_alter_function_args__isset;
+
+class ThriftHiveMetastore_alter_function_args {
+ public:
+
+ ThriftHiveMetastore_alter_function_args() : dbName(), funcName() {
+ }
+
+ virtual ~ThriftHiveMetastore_alter_function_args() throw() {}
+
+ std::string dbName;
+ std::string funcName;
+ Function newFunc;
+
+ _ThriftHiveMetastore_alter_function_args__isset __isset;
+
+ void __set_dbName(const std::string& val) {
+ dbName = val;
+ }
+
+ void __set_funcName(const std::string& val) {
+ funcName = val;
+ }
+
+ void __set_newFunc(const Function& val) {
+ newFunc = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_alter_function_args & rhs) const
+ {
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(funcName == rhs.funcName))
+ return false;
+ if (!(newFunc == rhs.newFunc))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_alter_function_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_alter_function_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_alter_function_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_alter_function_pargs() throw() {}
+
+ const std::string* dbName;
+ const std::string* funcName;
+ const Function* newFunc;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_alter_function_result__isset {
+ _ThriftHiveMetastore_alter_function_result__isset() : o1(false), o2(false) {}
+ bool o1;
+ bool o2;
+} _ThriftHiveMetastore_alter_function_result__isset;
+
+class ThriftHiveMetastore_alter_function_result {
+ public:
+
+ ThriftHiveMetastore_alter_function_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_alter_function_result() throw() {}
+
+ InvalidOperationException o1;
+ MetaException o2;
+
+ _ThriftHiveMetastore_alter_function_result__isset __isset;
+
+ void __set_o1(const InvalidOperationException& val) {
+ o1 = val;
+ }
+
+ void __set_o2(const MetaException& val) {
+ o2 = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_alter_function_result & rhs) const
+ {
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o2 == rhs.o2))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_alter_function_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_alter_function_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_alter_function_presult__isset {
+ _ThriftHiveMetastore_alter_function_presult__isset() : o1(false), o2(false) {}
+ bool o1;
+ bool o2;
+} _ThriftHiveMetastore_alter_function_presult__isset;
+
+class ThriftHiveMetastore_alter_function_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_alter_function_presult() throw() {}
+
+ InvalidOperationException o1;
+ MetaException o2;
+
+ _ThriftHiveMetastore_alter_function_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_get_functions_args__isset {
+ _ThriftHiveMetastore_get_functions_args__isset() : dbName(false), pattern(false) {}
+ bool dbName;
+ bool pattern;
+} _ThriftHiveMetastore_get_functions_args__isset;
+
+class ThriftHiveMetastore_get_functions_args {
+ public:
+
+ ThriftHiveMetastore_get_functions_args() : dbName(), pattern() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_functions_args() throw() {}
+
+ std::string dbName;
+ std::string pattern;
+
+ _ThriftHiveMetastore_get_functions_args__isset __isset;
+
+ void __set_dbName(const std::string& val) {
+ dbName = val;
+ }
+
+ void __set_pattern(const std::string& val) {
+ pattern = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_get_functions_args & rhs) const
+ {
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(pattern == rhs.pattern))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_functions_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_functions_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_functions_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_functions_pargs() throw() {}
+
+ const std::string* dbName;
+ const std::string* pattern;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_functions_result__isset {
+ _ThriftHiveMetastore_get_functions_result__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_functions_result__isset;
+
+class ThriftHiveMetastore_get_functions_result {
+ public:
+
+ ThriftHiveMetastore_get_functions_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_functions_result() throw() {}
+
+ std::vector<std::string> success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_functions_result__isset __isset;
+
+ void __set_success(const std::vector<std::string> & val) {
+ success = val;
+ }
+
+ void __set_o1(const MetaException& val) {
+ o1 = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_get_functions_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_functions_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_functions_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_functions_presult__isset {
+ _ThriftHiveMetastore_get_functions_presult__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_functions_presult__isset;
+
+class ThriftHiveMetastore_get_functions_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_functions_presult() throw() {}
+
+ std::vector<std::string> * success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_functions_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_get_function_args__isset {
+ _ThriftHiveMetastore_get_function_args__isset() : dbName(false), funcName(false) {}
+ bool dbName;
+ bool funcName;
+} _ThriftHiveMetastore_get_function_args__isset;
+
+class ThriftHiveMetastore_get_function_args {
+ public:
+
+ ThriftHiveMetastore_get_function_args() : dbName(), funcName() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_function_args() throw() {}
+
+ std::string dbName;
+ std::string funcName;
+
+ _ThriftHiveMetastore_get_function_args__isset __isset;
+
+ void __set_dbName(const std::string& val) {
+ dbName = val;
+ }
+
+ void __set_funcName(const std::string& val) {
+ funcName = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_get_function_args & rhs) const
+ {
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(funcName == rhs.funcName))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_function_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_function_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_function_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_function_pargs() throw() {}
+
+ const std::string* dbName;
+ const std::string* funcName;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_function_result__isset {
+ _ThriftHiveMetastore_get_function_result__isset() : success(false), o1(false), o2(false) {}
+ bool success;
+ bool o1;
+ bool o2;
+} _ThriftHiveMetastore_get_function_result__isset;
+
+class ThriftHiveMetastore_get_function_result {
+ public:
+
+ ThriftHiveMetastore_get_function_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_function_result() throw() {}
+
+ Function success;
+ MetaException o1;
+ NoSuchObjectException o2;
+
+ _ThriftHiveMetastore_get_function_result__isset __isset;
+
+ void __set_success(const Function& val) {
+ success = val;
+ }
+
+ void __set_o1(const MetaException& val) {
+ o1 = val;
+ }
+
+ void __set_o2(const NoSuchObjectException& val) {
+ o2 = val;
+ }
+
+ bool operator == (const ThriftHiveMetastore_get_function_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ if (!(o2 == rhs.o2))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_function_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_function_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_function_presult__isset {
+ _ThriftHiveMetastore_get_function_presult__isset() : success(false), o1(false), o2(false) {}
+ bool success;
+ bool o1;
+ bool o2;
+} _ThriftHiveMetastore_get_function_presult__isset;
+
+class ThriftHiveMetastore_get_function_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_function_presult() throw() {}
+
+ Function* success;
+ MetaException o1;
+ NoSuchObjectException o2;
+
+ _ThriftHiveMetastore_get_function_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
typedef struct _ThriftHiveMetastore_create_role_args__isset {
_ThriftHiveMetastore_create_role_args__isset() : role(false) {}
bool role;
@@ -12998,6 +13683,21 @@ class ThriftHiveMetastoreClient : virtua
bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name);
void send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name);
bool recv_delete_table_column_statistics();
+ void create_function(const Function& func);
+ void send_create_function(const Function& func);
+ void recv_create_function();
+ void drop_function(const std::string& dbName, const std::string& funcName);
+ void send_drop_function(const std::string& dbName, const std::string& funcName);
+ void recv_drop_function();
+ void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc);
+ void send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc);
+ void recv_alter_function();
+ void get_functions(std::vector<std::string> & _return, const std::string& dbName, const std::string& pattern);
+ void send_get_functions(const std::string& dbName, const std::string& pattern);
+ void recv_get_functions(std::vector<std::string> & _return);
+ void get_function(Function& _return, const std::string& dbName, const std::string& funcName);
+ void send_get_function(const std::string& dbName, const std::string& funcName);
+ void recv_get_function(Function& _return);
bool create_role(const Role& role);
void send_create_role(const Role& role);
bool recv_create_role();
@@ -13123,6 +13823,11 @@ class ThriftHiveMetastoreProcessor : pub
void process_get_partitions_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -13214,6 +13919,11 @@ class ThriftHiveMetastoreProcessor : pub
processMap_["get_partitions_statistics_req"] = &ThriftHiveMetastoreProcessor::process_get_partitions_statistics_req;
processMap_["delete_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics;
processMap_["delete_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_table_column_statistics;
+ processMap_["create_function"] = &ThriftHiveMetastoreProcessor::process_create_function;
+ processMap_["drop_function"] = &ThriftHiveMetastoreProcessor::process_drop_function;
+ processMap_["alter_function"] = &ThriftHiveMetastoreProcessor::process_alter_function;
+ processMap_["get_functions"] = &ThriftHiveMetastoreProcessor::process_get_functions;
+ processMap_["get_function"] = &ThriftHiveMetastoreProcessor::process_get_function;
processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role;
processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role;
processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names;
@@ -13962,6 +14672,53 @@ class ThriftHiveMetastoreMultiface : vir
return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name);
}
+ void create_function(const Function& func) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->create_function(func);
+ }
+ ifaces_[i]->create_function(func);
+ }
+
+ void drop_function(const std::string& dbName, const std::string& funcName) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->drop_function(dbName, funcName);
+ }
+ ifaces_[i]->drop_function(dbName, funcName);
+ }
+
+ void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->alter_function(dbName, funcName, newFunc);
+ }
+ ifaces_[i]->alter_function(dbName, funcName, newFunc);
+ }
+
+ void get_functions(std::vector<std::string> & _return, const std::string& dbName, const std::string& pattern) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->get_functions(_return, dbName, pattern);
+ }
+ ifaces_[i]->get_functions(_return, dbName, pattern);
+ return;
+ }
+
+ void get_function(Function& _return, const std::string& dbName, const std::string& funcName) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->get_function(_return, dbName, funcName);
+ }
+ ifaces_[i]->get_function(_return, dbName, funcName);
+ return;
+ }
+
bool create_role(const Role& role) {
size_t sz = ifaces_.size();
size_t i = 0;
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp Wed Feb 19 23:50:32 2014
@@ -387,6 +387,31 @@ class ThriftHiveMetastoreHandler : virtu
printf("delete_table_column_statistics\n");
}
+ void create_function(const Function& func) {
+ // Your implementation goes here
+ printf("create_function\n");
+ }
+
+ void drop_function(const std::string& dbName, const std::string& funcName) {
+ // Your implementation goes here
+ printf("drop_function\n");
+ }
+
+ void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) {
+ // Your implementation goes here
+ printf("alter_function\n");
+ }
+
+ void get_functions(std::vector<std::string> & _return, const std::string& dbName, const std::string& pattern) {
+ // Your implementation goes here
+ printf("get_functions\n");
+ }
+
+ void get_function(Function& _return, const std::string& dbName, const std::string& funcName) {
+ // Your implementation goes here
+ printf("get_function\n");
+ }
+
bool create_role(const Role& role) {
// Your implementation goes here
printf("create_role\n");
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp Wed Feb 19 23:50:32 2014
@@ -46,6 +46,14 @@ const char* _kPartitionEventTypeNames[]
};
const std::map<int, const char*> _PartitionEventType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kPartitionEventTypeValues, _kPartitionEventTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kFunctionTypeValues[] = {
+ FunctionType::JAVA
+};
+const char* _kFunctionTypeNames[] = {
+ "JAVA"
+};
+const std::map<int, const char*> _FunctionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFunctionTypeValues, _kFunctionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
const char* Version::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
const uint8_t Version::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
@@ -5178,6 +5186,150 @@ void swap(DropPartitionsRequest &a, Drop
swap(a.__isset, b.__isset);
}
+const char* Function::ascii_fingerprint = "86DDA615E907A95BA1CF7EDB4925A7F5";
+const uint8_t Function::binary_fingerprint[16] = {0x86,0xDD,0xA6,0x15,0xE9,0x07,0xA9,0x5B,0xA1,0xCF,0x7E,0xDB,0x49,0x25,0xA7,0xF5};
+
+uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ 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->functionName);
+ this->__isset.functionName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->dbName);
+ this->__isset.dbName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->className);
+ this->__isset.className = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->ownerName);
+ this->__isset.ownerName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast276;
+ xfer += iprot->readI32(ecast276);
+ this->ownerType = (PrincipalType::type)ecast276;
+ this->__isset.ownerType = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->createTime);
+ this->__isset.createTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast277;
+ xfer += iprot->readI32(ecast277);
+ this->functionType = (FunctionType::type)ecast277;
+ this->__isset.functionType = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Function");
+
+ xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->functionName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->dbName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->className);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->ownerName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 5);
+ xfer += oprot->writeI32((int32_t)this->ownerType);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 6);
+ xfer += oprot->writeI32(this->createTime);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_I32, 7);
+ xfer += oprot->writeI32((int32_t)this->functionType);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(Function &a, Function &b) {
+ using ::std::swap;
+ swap(a.functionName, b.functionName);
+ swap(a.dbName, b.dbName);
+ swap(a.className, b.className);
+ swap(a.ownerName, b.ownerName);
+ swap(a.ownerType, b.ownerType);
+ swap(a.createTime, b.createTime);
+ swap(a.functionType, b.functionType);
+ swap(a.__isset, b.__isset);
+}
+
const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h Wed Feb 19 23:50:32 2014
@@ -47,6 +47,14 @@ struct PartitionEventType {
extern const std::map<int, const char*> _PartitionEventType_VALUES_TO_NAMES;
+struct FunctionType {
+ enum type {
+ JAVA = 1
+ };
+};
+
+extern const std::map<int, const char*> _FunctionType_VALUES_TO_NAMES;
+
typedef struct _Version__isset {
_Version__isset() : version(false), comments(false) {}
bool version;
@@ -2735,6 +2743,97 @@ class DropPartitionsRequest {
void swap(DropPartitionsRequest &a, DropPartitionsRequest &b);
+typedef struct _Function__isset {
+ _Function__isset() : functionName(false), dbName(false), className(false), ownerName(false), ownerType(false), createTime(false), functionType(false) {}
+ bool functionName;
+ bool dbName;
+ bool className;
+ bool ownerName;
+ bool ownerType;
+ bool createTime;
+ bool functionType;
+} _Function__isset;
+
+class Function {
+ public:
+
+ static const char* ascii_fingerprint; // = "86DDA615E907A95BA1CF7EDB4925A7F5";
+ static const uint8_t binary_fingerprint[16]; // = {0x86,0xDD,0xA6,0x15,0xE9,0x07,0xA9,0x5B,0xA1,0xCF,0x7E,0xDB,0x49,0x25,0xA7,0xF5};
+
+ Function() : functionName(), dbName(), className(), ownerName(), ownerType((PrincipalType::type)0), createTime(0), functionType((FunctionType::type)0) {
+ }
+
+ virtual ~Function() throw() {}
+
+ std::string functionName;
+ std::string dbName;
+ std::string className;
+ std::string ownerName;
+ PrincipalType::type ownerType;
+ int32_t createTime;
+ FunctionType::type functionType;
+
+ _Function__isset __isset;
+
+ void __set_functionName(const std::string& val) {
+ functionName = val;
+ }
+
+ void __set_dbName(const std::string& val) {
+ dbName = val;
+ }
+
+ void __set_className(const std::string& val) {
+ className = val;
+ }
+
+ void __set_ownerName(const std::string& val) {
+ ownerName = val;
+ }
+
+ void __set_ownerType(const PrincipalType::type val) {
+ ownerType = val;
+ }
+
+ void __set_createTime(const int32_t val) {
+ createTime = val;
+ }
+
+ void __set_functionType(const FunctionType::type val) {
+ functionType = val;
+ }
+
+ bool operator == (const Function & rhs) const
+ {
+ if (!(functionName == rhs.functionName))
+ return false;
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(className == rhs.className))
+ return false;
+ if (!(ownerName == rhs.ownerName))
+ return false;
+ if (!(ownerType == rhs.ownerType))
+ return false;
+ if (!(createTime == rhs.createTime))
+ return false;
+ if (!(functionType == rhs.functionType))
+ return false;
+ return true;
+ }
+ bool operator != (const Function &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Function & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(Function &a, Function &b);
+
typedef struct _MetaException__isset {
_MetaException__isset() : message(false) {}
bool message;
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java Wed Feb 19 23:50:32 2014
@@ -704,7 +704,7 @@ public class AddPartitionsRequest implem
struct.parts = new ArrayList<Partition>(_list322.size);
for (int _i323 = 0; _i323 < _list322.size; ++_i323)
{
- Partition _elem324; // required
+ Partition _elem324; // optional
_elem324 = new Partition();
_elem324.read(iprot);
struct.parts.add(_elem324);
@@ -824,7 +824,7 @@ public class AddPartitionsRequest implem
struct.parts = new ArrayList<Partition>(_list327.size);
for (int _i328 = 0; _i328 < _list327.size; ++_i328)
{
- Partition _elem329; // required
+ Partition _elem329; // optional
_elem329 = new Partition();
_elem329.read(iprot);
struct.parts.add(_elem329);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java Wed Feb 19 23:50:32 2014
@@ -346,7 +346,7 @@ public class AddPartitionsResult impleme
struct.partitions = new ArrayList<Partition>(_list314.size);
for (int _i315 = 0; _i315 < _list314.size; ++_i315)
{
- Partition _elem316; // required
+ Partition _elem316; // optional
_elem316 = new Partition();
_elem316.read(iprot);
struct.partitions.add(_elem316);
@@ -428,7 +428,7 @@ public class AddPartitionsResult impleme
struct.partitions = new ArrayList<Partition>(_list319.size);
for (int _i320 = 0; _i320 < _list319.size; ++_i320)
{
- Partition _elem321; // required
+ Partition _elem321; // optional
_elem321 = new Partition();
_elem321.read(iprot);
struct.partitions.add(_elem321);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java Wed Feb 19 23:50:32 2014
@@ -451,7 +451,7 @@ public class ColumnStatistics implements
struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list220.size);
for (int _i221 = 0; _i221 < _list220.size; ++_i221)
{
- ColumnStatisticsObj _elem222; // required
+ ColumnStatisticsObj _elem222; // optional
_elem222 = new ColumnStatisticsObj();
_elem222.read(iprot);
struct.statsObj.add(_elem222);
@@ -531,7 +531,7 @@ public class ColumnStatistics implements
struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list225.size);
for (int _i226 = 0; _i226 < _list225.size; ++_i226)
{
- ColumnStatisticsObj _elem227; // required
+ ColumnStatisticsObj _elem227; // optional
_elem227 = new ColumnStatisticsObj();
_elem227.read(iprot);
struct.statsObj.add(_elem227);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java Wed Feb 19 23:50:32 2014
@@ -346,7 +346,7 @@ public class DropPartitionsResult implem
struct.partitions = new ArrayList<Partition>(_list330.size);
for (int _i331 = 0; _i331 < _list330.size; ++_i331)
{
- Partition _elem332; // required
+ Partition _elem332; // optional
_elem332 = new Partition();
_elem332.read(iprot);
struct.partitions.add(_elem332);
@@ -428,7 +428,7 @@ public class DropPartitionsResult implem
struct.partitions = new ArrayList<Partition>(_list335.size);
for (int _i336 = 0; _i336 < _list335.size; ++_i336)
{
- Partition _elem337; // required
+ Partition _elem337; // optional
_elem337 = new Partition();
_elem337.read(iprot);
struct.partitions.add(_elem337);
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java?rev=1569985&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java Wed Feb 19 23:50:32 2014
@@ -0,0 +1,1037 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+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 java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Function implements org.apache.thrift.TBase<Function, Function._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function");
+
+ private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField FUNCTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("functionType", org.apache.thrift.protocol.TType.I32, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory());
+ }
+
+ private String functionName; // required
+ private String dbName; // required
+ private String className; // required
+ private String ownerName; // required
+ private PrincipalType ownerType; // required
+ private int createTime; // required
+ private FunctionType functionType; // 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 {
+ FUNCTION_NAME((short)1, "functionName"),
+ DB_NAME((short)2, "dbName"),
+ CLASS_NAME((short)3, "className"),
+ OWNER_NAME((short)4, "ownerName"),
+ /**
+ *
+ * @see PrincipalType
+ */
+ OWNER_TYPE((short)5, "ownerType"),
+ CREATE_TIME((short)6, "createTime"),
+ /**
+ *
+ * @see FunctionType
+ */
+ FUNCTION_TYPE((short)7, "functionType");
+
+ 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: // FUNCTION_NAME
+ return FUNCTION_NAME;
+ case 2: // DB_NAME
+ return DB_NAME;
+ case 3: // CLASS_NAME
+ return CLASS_NAME;
+ case 4: // OWNER_NAME
+ return OWNER_NAME;
+ case 5: // OWNER_TYPE
+ return OWNER_TYPE;
+ case 6: // CREATE_TIME
+ return CREATE_TIME;
+ case 7: // FUNCTION_TYPE
+ return FUNCTION_TYPE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CREATETIME_ISSET_ID = 0;
+ private 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.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class)));
+ tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.FUNCTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("functionType", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FunctionType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap);
+ }
+
+ public Function() {
+ }
+
+ public Function(
+ String functionName,
+ String dbName,
+ String className,
+ String ownerName,
+ PrincipalType ownerType,
+ int createTime,
+ FunctionType functionType)
+ {
+ this();
+ this.functionName = functionName;
+ this.dbName = dbName;
+ this.className = className;
+ this.ownerName = ownerName;
+ this.ownerType = ownerType;
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ this.functionType = functionType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Function(Function other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetFunctionName()) {
+ this.functionName = other.functionName;
+ }
+ if (other.isSetDbName()) {
+ this.dbName = other.dbName;
+ }
+ if (other.isSetClassName()) {
+ this.className = other.className;
+ }
+ if (other.isSetOwnerName()) {
+ this.ownerName = other.ownerName;
+ }
+ if (other.isSetOwnerType()) {
+ this.ownerType = other.ownerType;
+ }
+ this.createTime = other.createTime;
+ if (other.isSetFunctionType()) {
+ this.functionType = other.functionType;
+ }
+ }
+
+ public Function deepCopy() {
+ return new Function(this);
+ }
+
+ @Override
+ public void clear() {
+ this.functionName = null;
+ this.dbName = null;
+ this.className = null;
+ this.ownerName = null;
+ this.ownerType = null;
+ setCreateTimeIsSet(false);
+ this.createTime = 0;
+ this.functionType = null;
+ }
+
+ public String getFunctionName() {
+ return this.functionName;
+ }
+
+ public void setFunctionName(String functionName) {
+ this.functionName = functionName;
+ }
+
+ public void unsetFunctionName() {
+ this.functionName = null;
+ }
+
+ /** Returns true if field functionName is set (has been assigned a value) and false otherwise */
+ public boolean isSetFunctionName() {
+ return this.functionName != null;
+ }
+
+ public void setFunctionNameIsSet(boolean value) {
+ if (!value) {
+ this.functionName = null;
+ }
+ }
+
+ public String getDbName() {
+ return this.dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ public void unsetDbName() {
+ this.dbName = null;
+ }
+
+ /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
+ public boolean isSetDbName() {
+ return this.dbName != null;
+ }
+
+ public void setDbNameIsSet(boolean value) {
+ if (!value) {
+ this.dbName = null;
+ }
+ }
+
+ public String getClassName() {
+ return this.className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void unsetClassName() {
+ this.className = null;
+ }
+
+ /** Returns true if field className is set (has been assigned a value) and false otherwise */
+ public boolean isSetClassName() {
+ return this.className != null;
+ }
+
+ public void setClassNameIsSet(boolean value) {
+ if (!value) {
+ this.className = null;
+ }
+ }
+
+ public String getOwnerName() {
+ return this.ownerName;
+ }
+
+ public void setOwnerName(String ownerName) {
+ this.ownerName = ownerName;
+ }
+
+ public void unsetOwnerName() {
+ this.ownerName = null;
+ }
+
+ /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerName() {
+ return this.ownerName != null;
+ }
+
+ public void setOwnerNameIsSet(boolean value) {
+ if (!value) {
+ this.ownerName = null;
+ }
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public PrincipalType getOwnerType() {
+ return this.ownerType;
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public void setOwnerType(PrincipalType ownerType) {
+ this.ownerType = ownerType;
+ }
+
+ public void unsetOwnerType() {
+ this.ownerType = null;
+ }
+
+ /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerType() {
+ return this.ownerType != null;
+ }
+
+ public void setOwnerTypeIsSet(boolean value) {
+ if (!value) {
+ this.ownerType = null;
+ }
+ }
+
+ public int getCreateTime() {
+ return this.createTime;
+ }
+
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ }
+
+ public void unsetCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ public void setCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see FunctionType
+ */
+ public FunctionType getFunctionType() {
+ return this.functionType;
+ }
+
+ /**
+ *
+ * @see FunctionType
+ */
+ public void setFunctionType(FunctionType functionType) {
+ this.functionType = functionType;
+ }
+
+ public void unsetFunctionType() {
+ this.functionType = null;
+ }
+
+ /** Returns true if field functionType is set (has been assigned a value) and false otherwise */
+ public boolean isSetFunctionType() {
+ return this.functionType != null;
+ }
+
+ public void setFunctionTypeIsSet(boolean value) {
+ if (!value) {
+ this.functionType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FUNCTION_NAME:
+ if (value == null) {
+ unsetFunctionName();
+ } else {
+ setFunctionName((String)value);
+ }
+ break;
+
+ case DB_NAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case CLASS_NAME:
+ if (value == null) {
+ unsetClassName();
+ } else {
+ setClassName((String)value);
+ }
+ break;
+
+ case OWNER_NAME:
+ if (value == null) {
+ unsetOwnerName();
+ } else {
+ setOwnerName((String)value);
+ }
+ break;
+
+ case OWNER_TYPE:
+ if (value == null) {
+ unsetOwnerType();
+ } else {
+ setOwnerType((PrincipalType)value);
+ }
+ break;
+
+ case CREATE_TIME:
+ if (value == null) {
+ unsetCreateTime();
+ } else {
+ setCreateTime((Integer)value);
+ }
+ break;
+
+ case FUNCTION_TYPE:
+ if (value == null) {
+ unsetFunctionType();
+ } else {
+ setFunctionType((FunctionType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FUNCTION_NAME:
+ return getFunctionName();
+
+ case DB_NAME:
+ return getDbName();
+
+ case CLASS_NAME:
+ return getClassName();
+
+ case OWNER_NAME:
+ return getOwnerName();
+
+ case OWNER_TYPE:
+ return getOwnerType();
+
+ case CREATE_TIME:
+ return Integer.valueOf(getCreateTime());
+
+ case FUNCTION_TYPE:
+ return getFunctionType();
+
+ }
+ 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 FUNCTION_NAME:
+ return isSetFunctionName();
+ case DB_NAME:
+ return isSetDbName();
+ case CLASS_NAME:
+ return isSetClassName();
+ case OWNER_NAME:
+ return isSetOwnerName();
+ case OWNER_TYPE:
+ return isSetOwnerType();
+ case CREATE_TIME:
+ return isSetCreateTime();
+ case FUNCTION_TYPE:
+ return isSetFunctionType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Function)
+ return this.equals((Function)that);
+ return false;
+ }
+
+ public boolean equals(Function that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_functionName = true && this.isSetFunctionName();
+ boolean that_present_functionName = true && that.isSetFunctionName();
+ if (this_present_functionName || that_present_functionName) {
+ if (!(this_present_functionName && that_present_functionName))
+ return false;
+ if (!this.functionName.equals(that.functionName))
+ return false;
+ }
+
+ boolean this_present_dbName = true && this.isSetDbName();
+ boolean that_present_dbName = true && that.isSetDbName();
+ if (this_present_dbName || that_present_dbName) {
+ if (!(this_present_dbName && that_present_dbName))
+ return false;
+ if (!this.dbName.equals(that.dbName))
+ return false;
+ }
+
+ boolean this_present_className = true && this.isSetClassName();
+ boolean that_present_className = true && that.isSetClassName();
+ if (this_present_className || that_present_className) {
+ if (!(this_present_className && that_present_className))
+ return false;
+ if (!this.className.equals(that.className))
+ return false;
+ }
+
+ boolean this_present_ownerName = true && this.isSetOwnerName();
+ boolean that_present_ownerName = true && that.isSetOwnerName();
+ if (this_present_ownerName || that_present_ownerName) {
+ if (!(this_present_ownerName && that_present_ownerName))
+ return false;
+ if (!this.ownerName.equals(that.ownerName))
+ return false;
+ }
+
+ boolean this_present_ownerType = true && this.isSetOwnerType();
+ boolean that_present_ownerType = true && that.isSetOwnerType();
+ if (this_present_ownerType || that_present_ownerType) {
+ if (!(this_present_ownerType && that_present_ownerType))
+ return false;
+ if (!this.ownerType.equals(that.ownerType))
+ return false;
+ }
+
+ boolean this_present_createTime = true;
+ boolean that_present_createTime = true;
+ if (this_present_createTime || that_present_createTime) {
+ if (!(this_present_createTime && that_present_createTime))
+ return false;
+ if (this.createTime != that.createTime)
+ return false;
+ }
+
+ boolean this_present_functionType = true && this.isSetFunctionType();
+ boolean that_present_functionType = true && that.isSetFunctionType();
+ if (this_present_functionType || that_present_functionType) {
+ if (!(this_present_functionType && that_present_functionType))
+ return false;
+ if (!this.functionType.equals(that.functionType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_functionName = true && (isSetFunctionName());
+ builder.append(present_functionName);
+ if (present_functionName)
+ builder.append(functionName);
+
+ boolean present_dbName = true && (isSetDbName());
+ builder.append(present_dbName);
+ if (present_dbName)
+ builder.append(dbName);
+
+ boolean present_className = true && (isSetClassName());
+ builder.append(present_className);
+ if (present_className)
+ builder.append(className);
+
+ boolean present_ownerName = true && (isSetOwnerName());
+ builder.append(present_ownerName);
+ if (present_ownerName)
+ builder.append(ownerName);
+
+ boolean present_ownerType = true && (isSetOwnerType());
+ builder.append(present_ownerType);
+ if (present_ownerType)
+ builder.append(ownerType.getValue());
+
+ boolean present_createTime = true;
+ builder.append(present_createTime);
+ if (present_createTime)
+ builder.append(createTime);
+
+ boolean present_functionType = true && (isSetFunctionType());
+ builder.append(present_functionType);
+ if (present_functionType)
+ builder.append(functionType.getValue());
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(Function other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Function typedOther = (Function)other;
+
+ lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(typedOther.isSetFunctionName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFunctionName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, typedOther.functionName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDbName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetClassName()).compareTo(typedOther.isSetClassName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetClassName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, typedOther.className);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(typedOther.isSetOwnerName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, typedOther.ownerName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(typedOther.isSetOwnerType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, typedOther.ownerType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, typedOther.createTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFunctionType()).compareTo(typedOther.isSetFunctionType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFunctionType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionType, typedOther.functionType);
+ 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("Function(");
+ boolean first = true;
+
+ sb.append("functionName:");
+ if (this.functionName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.functionName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dbName:");
+ if (this.dbName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dbName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("className:");
+ if (this.className == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.className);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerName:");
+ if (this.ownerName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerType:");
+ if (this.ownerType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerType);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("createTime:");
+ sb.append(this.createTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("functionType:");
+ if (this.functionType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.functionType);
+ }
+ 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 FunctionStandardSchemeFactory implements SchemeFactory {
+ public FunctionStandardScheme getScheme() {
+ return new FunctionStandardScheme();
+ }
+ }
+
+ private static class FunctionStandardScheme extends StandardScheme<Function> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Function 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: // FUNCTION_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.functionName = iprot.readString();
+ struct.setFunctionNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CLASS_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.className = iprot.readString();
+ struct.setClassNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OWNER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerName = iprot.readString();
+ struct.setOwnerNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // OWNER_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.ownerType = PrincipalType.findByValue(iprot.readI32());
+ struct.setOwnerTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.createTime = iprot.readI32();
+ struct.setCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // FUNCTION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.functionType = FunctionType.findByValue(iprot.readI32());
+ struct.setFunctionTypeIsSet(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, Function struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.functionName != null) {
+ oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC);
+ oprot.writeString(struct.functionName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.className != null) {
+ oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC);
+ oprot.writeString(struct.className);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ownerName != null) {
+ oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC);
+ oprot.writeString(struct.ownerName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ownerType != null) {
+ oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.ownerType.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+ oprot.writeI32(struct.createTime);
+ oprot.writeFieldEnd();
+ if (struct.functionType != null) {
+ oprot.writeFieldBegin(FUNCTION_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.functionType.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class FunctionTupleSchemeFactory implements SchemeFactory {
+ public FunctionTupleScheme getScheme() {
+ return new FunctionTupleScheme();
+ }
+ }
+
+ private static class FunctionTupleScheme extends TupleScheme<Function> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetFunctionName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDbName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetClassName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOwnerName()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOwnerType()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreateTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetFunctionType()) {
+ optionals.set(6);
+ }
+ oprot.writeBitSet(optionals, 7);
+ if (struct.isSetFunctionName()) {
+ oprot.writeString(struct.functionName);
+ }
+ if (struct.isSetDbName()) {
+ oprot.writeString(struct.dbName);
+ }
+ if (struct.isSetClassName()) {
+ oprot.writeString(struct.className);
+ }
+ if (struct.isSetOwnerName()) {
+ oprot.writeString(struct.ownerName);
+ }
+ if (struct.isSetOwnerType()) {
+ oprot.writeI32(struct.ownerType.getValue());
+ }
+ if (struct.isSetCreateTime()) {
+ oprot.writeI32(struct.createTime);
+ }
+ if (struct.isSetFunctionType()) {
+ oprot.writeI32(struct.functionType.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(7);
+ if (incoming.get(0)) {
+ struct.functionName = iprot.readString();
+ struct.setFunctionNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.className = iprot.readString();
+ struct.setClassNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ownerName = iprot.readString();
+ struct.setOwnerNameIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ownerType = PrincipalType.findByValue(iprot.readI32());
+ struct.setOwnerTypeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createTime = iprot.readI32();
+ struct.setCreateTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.functionType = FunctionType.findByValue(iprot.readI32());
+ struct.setFunctionTypeIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java?rev=1569985&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java Wed Feb 19 23:50:32 2014
@@ -0,0 +1,42 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum FunctionType implements org.apache.thrift.TEnum {
+ JAVA(1);
+
+ private final int value;
+
+ private FunctionType(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 FunctionType findByValue(int value) {
+ switch (value) {
+ case 1:
+ return JAVA;
+ default:
+ return null;
+ }
+ }
+}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java Wed Feb 19 23:50:32 2014
@@ -710,7 +710,7 @@ public class HiveObjectRef implements or
struct.partValues = new ArrayList<String>(_list8.size);
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
{
- String _elem10; // required
+ String _elem10; // optional
_elem10 = iprot.readString();
struct.partValues.add(_elem10);
}
@@ -853,7 +853,7 @@ public class HiveObjectRef implements or
struct.partValues = new ArrayList<String>(_list13.size);
for (int _i14 = 0; _i14 < _list13.size; ++_i14)
{
- String _elem15; // required
+ String _elem15; // optional
_elem15 = iprot.readString();
struct.partValues.add(_elem15);
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java Wed Feb 19 23:50:32 2014
@@ -945,7 +945,7 @@ public class Partition implements org.ap
struct.values = new ArrayList<String>(_list192.size);
for (int _i193 = 0; _i193 < _list192.size; ++_i193)
{
- String _elem194; // required
+ String _elem194; // optional
_elem194 = iprot.readString();
struct.values.add(_elem194);
}
@@ -1184,7 +1184,7 @@ public class Partition implements org.ap
struct.values = new ArrayList<String>(_list203.size);
for (int _i204 = 0; _i204 < _list203.size; ++_i204)
{
- String _elem205; // required
+ String _elem205; // optional
_elem205 = iprot.readString();
struct.values.add(_elem205);
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java Wed Feb 19 23:50:32 2014
@@ -439,7 +439,7 @@ public class PartitionsByExprResult impl
struct.partitions = new ArrayList<Partition>(_list256.size);
for (int _i257 = 0; _i257 < _list256.size; ++_i257)
{
- Partition _elem258; // required
+ Partition _elem258; // optional
_elem258 = new Partition();
_elem258.read(iprot);
struct.partitions.add(_elem258);
@@ -522,7 +522,7 @@ public class PartitionsByExprResult impl
struct.partitions = new ArrayList<Partition>(_list261.size);
for (int _i262 = 0; _i262 < _list261.size; ++_i262)
{
- Partition _elem263; // required
+ Partition _elem263; // optional
_elem263 = new Partition();
_elem263.read(iprot);
struct.partitions.add(_elem263);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java Wed Feb 19 23:50:32 2014
@@ -645,7 +645,7 @@ public class PartitionsStatsRequest impl
struct.colNames = new ArrayList<String>(_list298.size);
for (int _i299 = 0; _i299 < _list298.size; ++_i299)
{
- String _elem300; // required
+ String _elem300; // optional
_elem300 = iprot.readString();
struct.colNames.add(_elem300);
}
@@ -663,7 +663,7 @@ public class PartitionsStatsRequest impl
struct.partNames = new ArrayList<String>(_list301.size);
for (int _i302 = 0; _i302 < _list301.size; ++_i302)
{
- String _elem303; // required
+ String _elem303; // optional
_elem303 = iprot.readString();
struct.partNames.add(_elem303);
}
@@ -768,7 +768,7 @@ public class PartitionsStatsRequest impl
struct.colNames = new ArrayList<String>(_list308.size);
for (int _i309 = 0; _i309 < _list308.size; ++_i309)
{
- String _elem310; // required
+ String _elem310; // optional
_elem310 = iprot.readString();
struct.colNames.add(_elem310);
}
@@ -779,7 +779,7 @@ public class PartitionsStatsRequest impl
struct.partNames = new ArrayList<String>(_list311.size);
for (int _i312 = 0; _i312 < _list311.size; ++_i312)
{
- String _elem313; // required
+ String _elem313; // optional
_elem313 = iprot.readString();
struct.partNames.add(_elem313);
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java?rev=1569985&r1=1569984&r2=1569985&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java Wed Feb 19 23:50:32 2014
@@ -371,7 +371,7 @@ public class PartitionsStatsResult imple
_val275 = new ArrayList<ColumnStatisticsObj>(_list276.size);
for (int _i277 = 0; _i277 < _list276.size; ++_i277)
{
- ColumnStatisticsObj _elem278; // required
+ ColumnStatisticsObj _elem278; // optional
_elem278 = new ColumnStatisticsObj();
_elem278.read(iprot);
_val275.add(_elem278);
@@ -469,7 +469,7 @@ public class PartitionsStatsResult imple
_val286 = new ArrayList<ColumnStatisticsObj>(_list287.size);
for (int _i288 = 0; _i288 < _list287.size; ++_i288)
{
- ColumnStatisticsObj _elem289; // required
+ ColumnStatisticsObj _elem289; // optional
_elem289 = new ColumnStatisticsObj();
_elem289.read(iprot);
_val286.add(_elem289);