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=1609876&r1=1609875&r2=1609876&view=diff ============================================================================== --- hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (original) +++ hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h Sat Jul 12 01:59:45 2014 @@ -100,6 +100,7 @@ class ThriftHiveMetastoreIf : virtual pu virtual bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) = 0; virtual bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) = 0; virtual void list_roles(std::vector<Role> & _return, const std::string& principal_name, const PrincipalType::type principal_type) = 0; + virtual void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) = 0; virtual void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) = 0; virtual void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) = 0; virtual void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector<std::string> & group_names) = 0; @@ -422,6 +423,9 @@ class ThriftHiveMetastoreNull : virtual void list_roles(std::vector<Role> & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { return; } + void grant_revoke_role(GrantRevokeRoleResponse& /* _return */, const GrantRevokeRoleRequest& /* request */) { + return; + } void get_principals_in_role(GetPrincipalsInRoleResponse& /* _return */, const GetPrincipalsInRoleRequest& /* request */) { return; } @@ -12524,6 +12528,124 @@ class ThriftHiveMetastore_list_roles_pre }; +typedef struct _ThriftHiveMetastore_grant_revoke_role_args__isset { + _ThriftHiveMetastore_grant_revoke_role_args__isset() : request(false) {} + bool request; +} _ThriftHiveMetastore_grant_revoke_role_args__isset; + +class ThriftHiveMetastore_grant_revoke_role_args { + public: + + ThriftHiveMetastore_grant_revoke_role_args() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_role_args() throw() {} + + GrantRevokeRoleRequest request; + + _ThriftHiveMetastore_grant_revoke_role_args__isset __isset; + + void __set_request(const GrantRevokeRoleRequest& val) { + request = val; + } + + bool operator == (const ThriftHiveMetastore_grant_revoke_role_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_revoke_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_role_pargs() throw() {} + + const GrantRevokeRoleRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_role_result__isset { + _ThriftHiveMetastore_grant_revoke_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_revoke_role_result__isset; + +class ThriftHiveMetastore_grant_revoke_role_result { + public: + + ThriftHiveMetastore_grant_revoke_role_result() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_role_result() throw() {} + + GrantRevokeRoleResponse success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_role_result__isset __isset; + + void __set_success(const GrantRevokeRoleResponse& val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_grant_revoke_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_role_presult__isset { + _ThriftHiveMetastore_grant_revoke_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_revoke_role_presult__isset; + +class ThriftHiveMetastore_grant_revoke_role_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_role_presult() throw() {} + + GrantRevokeRoleResponse* success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_get_principals_in_role_args__isset { _ThriftHiveMetastore_get_principals_in_role_args__isset() : request(false) {} bool request; @@ -15458,6 +15580,9 @@ class ThriftHiveMetastoreClient : virtua void list_roles(std::vector<Role> & _return, const std::string& principal_name, const PrincipalType::type principal_type); void send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); void recv_list_roles(std::vector<Role> & _return); + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request); + void send_grant_revoke_role(const GrantRevokeRoleRequest& request); + void recv_grant_revoke_role(GrantRevokeRoleResponse& _return); void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request); void send_get_principals_in_role(const GetPrincipalsInRoleRequest& request); void recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return); @@ -15621,6 +15746,7 @@ class ThriftHiveMetastoreProcessor : pub void process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_principals_in_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_role_grants_for_principal(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -15732,6 +15858,7 @@ class ThriftHiveMetastoreProcessor : pub processMap_["grant_role"] = &ThriftHiveMetastoreProcessor::process_grant_role; processMap_["revoke_role"] = &ThriftHiveMetastoreProcessor::process_revoke_role; processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; + processMap_["grant_revoke_role"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_role; processMap_["get_principals_in_role"] = &ThriftHiveMetastoreProcessor::process_get_principals_in_role; processMap_["get_role_grants_for_principal"] = &ThriftHiveMetastoreProcessor::process_get_role_grants_for_principal; processMap_["get_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_privilege_set; @@ -16592,6 +16719,16 @@ class ThriftHiveMetastoreMultiface : vir return; } + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_revoke_role(_return, request); + } + ifaces_[i]->grant_revoke_role(_return, request); + return; + } + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { 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=1609876&r1=1609875&r2=1609876&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 Sat Jul 12 01:59:45 2014 @@ -442,6 +442,11 @@ class ThriftHiveMetastoreHandler : virtu printf("list_roles\n"); } + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { + // Your implementation goes here + printf("grant_revoke_role\n"); + } + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { // Your implementation goes here printf("get_principals_in_role\n");
