You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2014/03/29 00:33:55 UTC
svn commit: r1582912 [1/13] - in /hive/branches/branch-0.13: metastore/if/
metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen/thrift/gen-php/metastore/ metastore/src/gen/thrif...
Author: thejas
Date: Fri Mar 28 23:33:53 2014
New Revision: 1582912
URL: http://svn.apache.org/r1582912
Log:
HIVE-6547 : normalize struct Role in metastore thrift interface (Thejas M Nair, reviewed by Ashutosh Chauhan)
Added:
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
Removed:
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveRole.java
Modified:
hive/branches/branch-0.13/metastore/if/hive_metastore.thrift
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-php/metastore/Types.php
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
hive/branches/branch-0.13/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
hive/branches/branch-0.13/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
hive/branches/branch-0.13/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
hive/branches/branch-0.13/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveAccessController.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveAuthorizer.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveAuthorizerImpl.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveRoleGrant.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/GrantPrivAuthUtils.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLAuthorizationUtils.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAccessController.java
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAuthorizationValidator.java
hive/branches/branch-0.13/ql/src/test/queries/clientpositive/authorization_role_grant2.q
hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_fail_7.q.out
hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_role_grant.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_1.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_1_sql_std.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_5.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_role_grant1.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_role_grant2.q.out
hive/branches/branch-0.13/ql/src/test/results/clientpositive/authorization_view_sqlstd.q.out
Modified: hive/branches/branch-0.13/metastore/if/hive_metastore.thrift
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/metastore/if/hive_metastore.thrift?rev=1582912&r1=1582911&r2=1582912&view=diff
==============================================================================
--- hive/branches/branch-0.13/metastore/if/hive_metastore.thrift (original)
+++ hive/branches/branch-0.13/metastore/if/hive_metastore.thrift Fri Mar 28 23:33:53 2014
@@ -138,16 +138,6 @@ 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 RolePrincipalGrant which gives a 'normalized' representation
- // of this information
- 4: optional string principalName,
- 5: optional string principalType,
- 6: optional bool grantOption,
- 7: optional i32 grantTime,
- 8: optional string grantor
}
// Representation of a grant for a principal to a role
@@ -161,12 +151,21 @@ struct RolePrincipalGrant {
7: PrincipalType grantorPrincipalType
}
+struct GetRoleGrantsForPrincipalRequest {
+ 1: required string principal_name,
+ 2: required PrincipalType principal_type
+}
+
+struct GetRoleGrantsForPrincipalResponse {
+ 1: required list<RolePrincipalGrant> principalGrants;
+}
+
struct GetPrincipalsInRoleRequest {
- 1: string roleName;
+ 1: required string roleName;
}
struct GetPrincipalsInRoleResponse {
- 1: list<RolePrincipalGrant> principalGrants;
+ 1: required list<RolePrincipalGrant> principalGrants;
}
// namespace for tables
@@ -959,6 +958,11 @@ service ThriftHiveMetastore extends fb30
// redundant as it would match the role_name argument of this function
GetPrincipalsInRoleResponse get_principals_in_role(1: GetPrincipalsInRoleRequest request) throws(1:MetaException o1)
+ // get grant information of all roles granted to the given principal
+ // Note that in the returned list of RolePrincipalGrants, the principal name,type is
+ // redundant as it would match the principal name,type arguments of this function
+ GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(1: GetRoleGrantsForPrincipalRequest request) throws(1:MetaException o1)
+
PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name,
3: list<string> group_names) throws(1:MetaException o1)
list<HiveObjectPrivilege> list_privileges(1:string principal_name, 2:PrincipalType principal_type,