mirror of
https://github.com/apache/sqoop.git
synced 2025-05-16 17:00:53 +08:00
SQOOP-2279: Sqoop2: Clean connector cache after grant and revoke statements
(Richard Zhou via Abraham Elmahrek)
This commit is contained in:
parent
0c06834dba
commit
ea5aa9c2d6
@ -99,9 +99,7 @@ private Status grantPrivilege(String action, String resourceType, String resourc
|
||||
Arrays.asList(principalObject),
|
||||
Arrays.asList(privilegeObject));
|
||||
|
||||
if (resourceType.toUpperCase().equals(MResource.TYPE.CONNECTOR.name())) {
|
||||
client.clearCache();
|
||||
}
|
||||
client.clearCache();
|
||||
|
||||
printlnResource(Constants.RES_GRANT_PRIVILEGE_SUCCESSFUL,
|
||||
action, resourceType + " " + resource,
|
||||
|
@ -75,6 +75,8 @@ private Status grantRole(String role, String principalType, String principal) th
|
||||
Arrays.asList(roleObject),
|
||||
Arrays.asList(principalObject));
|
||||
|
||||
client.clearCache();
|
||||
|
||||
printlnResource(Constants.RES_GRANT_ROLE_SUCCESSFUL,
|
||||
role, principalType + " " + principal);
|
||||
|
||||
|
@ -100,9 +100,7 @@ private Status revokePrivilege(String action, String resourceType, String resour
|
||||
Arrays.asList(principalObject),
|
||||
Arrays.asList(privilegeObject));
|
||||
|
||||
if (resourceType.toUpperCase().equals(MResource.TYPE.CONNECTOR.name())) {
|
||||
client.clearCache();
|
||||
}
|
||||
client.clearCache();
|
||||
|
||||
printlnResource(Constants.RES_REVOKE_PRIVILEGE_SUCCESSFUL,
|
||||
action, resourceType + " " + resource,
|
||||
|
@ -75,6 +75,8 @@ private Status revokeRole(String role, String principalType, String principal) t
|
||||
Arrays.asList(roleObject),
|
||||
Arrays.asList(principalObject));
|
||||
|
||||
client.clearCache();
|
||||
|
||||
printlnResource(Constants.RES_REVOKE_ROLE_SUCCESSFUL,
|
||||
role, principalType + " " + principal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user