cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Date Thu, 18 Sep 2014 13:53:05 GMT
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 381ff18b2390e5134b04b2669f44718b3c865238
Parents: d57890c ace937e
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Sep 18 06:52:34 2014 +0000
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Sep 18 06:52:34 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |  3 ++
 src/java/org/apache/cassandra/auth/Auth.java    | 46 +++++++++++++++++++-
 .../org/apache/cassandra/auth/AuthMBean.java    | 25 +++++++++++
 .../cassandra/config/DatabaseDescriptor.java    |  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +------------
 5 files changed, 81 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/auth/Auth.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/service/ClientState.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/ClientState.java
index 20682e9,09dc165..435c651
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@@ -20,13 -20,10 +20,9 @@@ package org.apache.cassandra.service
  import java.net.SocketAddress;
  import java.util.*;
  import java.util.concurrent.ExecutionException;
- import java.util.concurrent.TimeUnit;
  
- import com.google.common.cache.CacheBuilder;
- import com.google.common.cache.CacheLoader;
- import com.google.common.cache.LoadingCache;
  import com.google.common.collect.Iterables;
  import com.google.common.collect.Sets;
 -import org.apache.commons.lang3.StringUtils;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
@@@ -271,31 -298,19 +264,11 @@@ public class ClientStat
          return user;
      }
  
 -    public SemanticVersion getCQLVersion()
 -    {
 -        return cqlVersion;
 -    }
 -
      public static SemanticVersion[] getCQLSupportedVersion()
      {
 -        SemanticVersion cql = org.apache.cassandra.cql.QueryProcessor.CQL_VERSION;
 -        SemanticVersion cql3 = org.apache.cassandra.cql3.QueryProcessor.CQL_VERSION;
 -
 -        return new SemanticVersion[]{ cql, cql3 };
 +        return new SemanticVersion[]{ QueryProcessor.CQL_VERSION };
      }
  
-     private static LoadingCache<Pair<AuthenticatedUser, IResource>, Set<Permission>>
initPermissionsCache()
-     {
-         if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)
-             return null;
- 
-         int validityPeriod = DatabaseDescriptor.getPermissionsValidity();
-         if (validityPeriod <= 0)
-             return null;
- 
-         return CacheBuilder.newBuilder().expireAfterWrite(validityPeriod, TimeUnit.MILLISECONDS)
-                                         .build(new CacheLoader<Pair<AuthenticatedUser,
IResource>, Set<Permission>>()
-                                         {
-                                             public Set<Permission> load(Pair<AuthenticatedUser,
IResource> userResource)
-                                             {
-                                                 return DatabaseDescriptor.getAuthorizer().authorize(userResource.left,
-                                                                                        
            userResource.right);
-                                             }
-                                         });
-     }
- 
      private Set<Permission> authorize(IResource resource)
      {
          // AllowAllAuthorizer or manually disabled caching.


Mime
View raw message