5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-20 19:00:48 +08:00

SQOOP-2227: Sqoop2: Clear connector cache in ShowConnectorFunction.java

(Richard Zhou via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2015-03-23 11:43:17 -07:00
parent 756a3c17e2
commit 04f374b501
2 changed files with 8 additions and 0 deletions

View File

@ -99,6 +99,10 @@ 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();
}
printlnResource(Constants.RES_GRANT_PRIVILEGE_SUCCESSFUL,
action, resourceType + " " + resource,
((withGrant) ? " " + resourceString(Constants.RES_GRANT_PRIVILEGE_SUCCESSFUL_WITH_GRANT) : ""),

View File

@ -100,6 +100,10 @@ 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();
}
printlnResource(Constants.RES_REVOKE_PRIVILEGE_SUCCESSFUL,
action, resourceType + " " + resource,
((withGrant) ? " " + resourceString(Constants.RES_REVOKE_PRIVILEGE_SUCCESSFUL_WITH_GRANT) : ""),