sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2227: Sqoop2: Clear connector cache in ShowConnectorFunction.java
Date Mon, 23 Mar 2015 18:44:10 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 756a3c17e -> 04f374b50


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

(Richard Zhou via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/04f374b5
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/04f374b5
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/04f374b5

Branch: refs/heads/sqoop2
Commit: 04f374b501bcf479a7e9c697d1cfd792e4696168
Parents: 756a3c1
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Mar 23 11:43:17 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Mar 23 11:43:17 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java | 4 ++++
 .../java/org/apache/sqoop/shell/RevokePrivilegeFunction.java     | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/04f374b5/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java b/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
index ccf8988..27959d7 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
@@ -99,6 +99,10 @@ public class GrantPrivilegeFunction extends SqoopFunction {
       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)
: ""),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/04f374b5/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java b/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
index e0b86cf..0551b54 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
@@ -100,6 +100,10 @@ public class RevokePrivilegeFunction extends SqoopFunction {
       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)
: ""),


Mime
View raw message