diff --git a/metastore/if/hive_metastore.thrift b/metastore/if/hive_metastore.thrift index 58b2357..0b62478 100755 --- a/metastore/if/hive_metastore.thrift +++ b/metastore/if/hive_metastore.thrift @@ -107,6 +107,10 @@ struct Role { 1: string roleName, 2: i32 createTime, 3: string ownerName, +// Following fields are populated by list_roles +// They are ignored during other commands such as role creation +// See RoleMap which gives a 'normalized' representation +// of this information 4: optional string principalName, 5: optional string principalType, 6: optional bool grantOption, @@ -114,6 +118,16 @@ struct Role { 8: optional string grantor } +struct RoleGrant { + 1: string roleName, + 2: string principalName, + 3: string principalType, + 4: bool grantOption, + 5: i32 grantTime, + 6: string grantor +} + + // namespace for tables struct Database { 1: string name, @@ -745,6 +759,7 @@ service ThriftHiveMetastore extends fb303.FacebookService bool create_role(1:Role role) throws(1:MetaException o1) bool drop_role(1:string role_name) throws(1:MetaException o1) + list get_role_grants(1:string role_name) throws(1:MetaException o1) list get_role_names() throws(1:MetaException o1) bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, 4:string grantor, 5:PrincipalType grantorType, 6:bool grant_option) throws(1:MetaException o1)