cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/6] git commit: Add method to invalidate permission cache via JMX
Date Fri, 19 Sep 2014 00:13:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 3f79af23e -> 75e4acbe2
  refs/heads/cassandra-2.1 e1bc6b4a4 -> 7cfd3ed12
  refs/heads/trunk efa8efad4 -> 4c80d0fbe


Add method to invalidate permission cache via JMX

Patch by brandonwilliams, reviewed by aleksey for CASSANDRA-7977


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/75e4acbe
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/75e4acbe
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/75e4acbe

Branch: refs/heads/cassandra-2.0
Commit: 75e4acbe20a248c01fb340f6d59d7582e8b57803
Parents: 3f79af2
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Sep 18 17:12:27 2014 -0700
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Sep 18 17:12:27 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                       | 1 +
 src/java/org/apache/cassandra/auth/Auth.java      | 5 +++++
 src/java/org/apache/cassandra/auth/AuthMBean.java | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e4acbe/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fcf229d..e0b5688 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.11:
+ * Add method to invalidate permission cache via JMX (CASSANDRA-7977)
  * Allow propagating multiple gossip states atomically (CASSANDRA-6125)
  * Log exceptions related to unclean native protocol client disconnects
    at DEBUG or INFO (CASSANDRA-7849)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e4acbe/src/java/org/apache/cassandra/auth/Auth.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/auth/Auth.java b/src/java/org/apache/cassandra/auth/Auth.java
index 8027db4..94d4b3d 100644
--- a/src/java/org/apache/cassandra/auth/Auth.java
+++ b/src/java/org/apache/cassandra/auth/Auth.java
@@ -82,6 +82,11 @@ public class Auth implements AuthMBean
         permissionsCache = initPermissionsCache(permissionsCache);
     }
 
+    public void invalidatePermissionsCache()
+    {
+        permissionsCache = initPermissionsCache(null);
+    }
+
     private static LoadingCache<Pair<AuthenticatedUser, IResource>, Set<Permission>>
initPermissionsCache(LoadingCache<Pair<AuthenticatedUser, IResource>, Set<Permission>>
oldCache)
     {
         if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e4acbe/src/java/org/apache/cassandra/auth/AuthMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/auth/AuthMBean.java b/src/java/org/apache/cassandra/auth/AuthMBean.java
index 5ebbe49..db11f21 100644
--- a/src/java/org/apache/cassandra/auth/AuthMBean.java
+++ b/src/java/org/apache/cassandra/auth/AuthMBean.java
@@ -22,4 +22,6 @@ public interface AuthMBean
     public int getPermissionsValidity();
 
     public void setPermissionsValidity(int timeoutInMs);
+
+    public void invalidatePermissionsCache();
 }


Mime
View raw message