Repository: incubator-sentry
Updated Branches:
  refs/heads/master 9195cb9f5 -> 16ef2c3bd


SENTRY-699: Memory leak when running Sentry w/ HiveServer2 (Prasad Mujumdar, 
reviewed by Colin Ma)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/16ef2c3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/16ef2c3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/16ef2c3b

Branch: refs/heads/master
Commit: 16ef2c3bd502ccdcf63b8bb1090c213c21f75e03
Parents: 9195cb9
Author: Prasad Mujumdar <[email protected]>
Authored: Tue Apr 28 09:31:32 2015 -0700
Committer: Prasad Mujumdar <[email protected]>
Committed: Tue Apr 28 09:31:32 2015 -0700

----------------------------------------------------------------------
 .../common/ResourceAuthorizationProvider.java         | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/16ef2c3b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
----------------------------------------------------------------------
diff --git 
a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
 
b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
index 6449405..06573b7 100644
--- 
a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
+++ 
b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
@@ -47,23 +47,23 @@ import com.google.common.collect.Sets;
 public abstract class ResourceAuthorizationProvider implements 
AuthorizationProvider {
   private static final Logger LOGGER = LoggerFactory
       .getLogger(ResourceAuthorizationProvider.class);
+  private final static ThreadLocal<List<String>> lastFailedPrivileges =
+      new ThreadLocal<List<String>>() {
+        @Override
+        protected List<String> initialValue() {
+          return new ArrayList<String>();
+        }
+      };
 
   private final GroupMappingService groupService;
   private final PolicyEngine policy;
   private final PrivilegeFactory privilegeFactory;
-  private final ThreadLocal<List<String>> lastFailedPrivileges;
 
   public ResourceAuthorizationProvider(PolicyEngine policy,
       GroupMappingService groupService) {
     this.policy = policy;
     this.groupService = groupService;
     this.privilegeFactory = policy.getPrivilegeFactory();
-    this.lastFailedPrivileges = new ThreadLocal<List<String>>() {
-      @Override
-      protected List<String> initialValue() {
-        return new ArrayList<String>();
-      }
-    };
   }
 
   /***

Reply via email to