incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Removing username as a part of the query cache.
Date Tue, 03 Mar 2015 02:08:51 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master da4ad62d6 -> 8b5b12e77


Removing username as a part of the query cache.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/5833291f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/5833291f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/5833291f

Branch: refs/heads/master
Commit: 5833291f5aa967fbaa3783208047661e82784f7d
Parents: da4ad62
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Mar 2 21:07:48 2015 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Mar 2 21:07:48 2015 -0500

----------------------------------------------------------------------
 .../org/apache/blur/server/cache/ThriftCacheKey.java     | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5833291f/blur-core/src/main/java/org/apache/blur/server/cache/ThriftCacheKey.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/cache/ThriftCacheKey.java b/blur-core/src/main/java/org/apache/blur/server/cache/ThriftCacheKey.java
index 5866966..5c55ecf 100644
--- a/blur-core/src/main/java/org/apache/blur/server/cache/ThriftCacheKey.java
+++ b/blur-core/src/main/java/org/apache/blur/server/cache/ThriftCacheKey.java
@@ -26,7 +26,6 @@ import org.apache.blur.user.User;
 
 public class ThriftCacheKey<T extends TBase<?, ?>> {
 
-  private final String _username;
   private final Map<String, String> _attributes;
   private final String _table;
   private final int[] _shards;
@@ -40,7 +39,6 @@ public class ThriftCacheKey<T extends TBase<?, ?>> {
     _timestamp = System.nanoTime();
     _clazz = new ClassObj<T>(clazz);
     if (user != null) {
-      _username = user.getUsername();
       Map<String, String> attributes = user.getAttributes();
       if (attributes == null) {
         _attributes = attributes;
@@ -48,7 +46,6 @@ public class ThriftCacheKey<T extends TBase<?, ?>> {
         _attributes = new TreeMap<String, String>(user.getAttributes());
       }
     } else {
-      _username = null;
       _attributes = null;
     }
     _table = table;
@@ -67,7 +64,7 @@ public class ThriftCacheKey<T extends TBase<?, ?>> {
   @Override
   public String toString() {
     try {
-      return "ThriftCacheKey [_username=" + _username + ", _attributes=" + _attributes +
", _table=" + _table
+      return "ThriftCacheKey [_attributes=" + _attributes + ", _table=" + _table
           + ", _shards=" + Arrays.toString(_shards) + ", _clazz=" + _clazz + ", _key="
           + _key.getValue(_clazz.getClazz()) + ", _timestamp=" + _timestamp + "]";
     } catch (BlurException e) {
@@ -88,7 +85,6 @@ public class ThriftCacheKey<T extends TBase<?, ?>> {
     result = prime * result + ((_key == null) ? 0 : _key.hashCode());
     result = prime * result + Arrays.hashCode(_shards);
     result = prime * result + ((_table == null) ? 0 : _table.hashCode());
-    result = prime * result + ((_username == null) ? 0 : _username.hashCode());
     return result;
   }
 
@@ -123,11 +119,6 @@ public class ThriftCacheKey<T extends TBase<?, ?>> {
         return false;
     } else if (!_table.equals(other._table))
       return false;
-    if (_username == null) {
-      if (other._username != null)
-        return false;
-    } else if (!_username.equals(other._username))
-      return false;
     return true;
   }
 


Mime
View raw message