accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [06/12] accumulo git commit: ACCUMULO-3939
Date Tue, 28 Jul 2015 19:45:46 GMT
ACCUMULO-3939

Added getInstance() method to hid the SecurityOperation getInstance()
method which was returning a SecurityOperation rather than the
delegating class AuditedSecurityOperation

Signed-off-by: Josh Elser <elserj@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/262decd3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/262decd3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/262decd3

Branch: refs/heads/master
Commit: 262decd3c71b5217d51e51fc7febbea56827ba9f
Parents: abe13e3
Author: jamesmello <james.mello@atsid.com>
Authored: Wed Jul 22 10:34:59 2015 -0700
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Jul 28 15:38:00 2015 -0400

----------------------------------------------------------------------
 .../accumulo/server/security/AuditedSecurityOperation.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/262decd3/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
b/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index d309472..b2e810d 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
@@ -25,6 +25,7 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.security.handler.Authenticator;
 import org.apache.accumulo.server.security.handler.Authorizor;
 import org.apache.accumulo.server.security.handler.PermissionHandler;
@@ -41,6 +42,12 @@ public class AuditedSecurityOperation extends SecurityOperation {
 
   public static final Logger log = Logger.getLogger(AuditedSecurityOperation.class);
 
+  public static synchronized SecurityOperation getInstance() {
+    // ACCUMULO-3939 Ensure that an AuditedSecurityOperation instance gets returned.
+    String instanceId = HdfsZooInstance.getInstance().getInstanceID();
+    return getInstance(instanceId, false);
+  }
+
   public static synchronized SecurityOperation getInstance(String instanceId, boolean initialize)
{
     if (instance == null) {
       instance = new AuditedSecurityOperation(getAuthorizor(instanceId, initialize), getAuthenticator(instanceId,
initialize), getPermHandler(instanceId,


Mime
View raw message