accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [08/10] git commit: ACCUMULO-2086 ACCUMULO-2096 ACCUMULO-2286 Some more initial namespace support
Date Thu, 30 Jan 2014 21:57:59 GMT
ACCUMULO-2086 ACCUMULO-2096 ACCUMULO-2286 Some more initial namespace support


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

Branch: refs/heads/master
Commit: 3d8a1161e88b613e48b23e16cca12699d0ba0bf7
Parents: 939a4f9
Author: John Vines <vines@apache.org>
Authored: Thu Jan 30 16:51:59 2014 -0500
Committer: John Vines <vines@apache.org>
Committed: Thu Jan 30 16:51:59 2014 -0500

----------------------------------------------------------------------
 .../accumulo/test/randomwalk/security/SecurityFixture.java    | 7 +++++++
 .../accumulo/test/randomwalk/security/WalkingSecurity.java    | 5 +++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3d8a1161/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
index 8841355..30f12fb 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
@@ -87,6 +87,13 @@ public class SecurityFixture extends Fixture {
       conn.tableOperations().delete(secTableName);
     }
     
+    if (WalkingSecurity.get(state).getNamespaceExists()) {
+      String secNamespaceName = WalkingSecurity.get(state).getNamespaceName();
+      log.debug("Dropping namespace: " + secNamespaceName);
+      
+      conn.namespaceOperations().delete(secNamespaceName);
+    }
+    
     if (WalkingSecurity.get(state).userExists(WalkingSecurity.get(state).getTabUserName()))
{
       String tableUserName = WalkingSecurity.get(state).getTabUserName();
       log.debug("Dropping user: " + tableUserName);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3d8a1161/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
index 37bb364..fc53d01 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
@@ -88,6 +88,7 @@ public class WalkingSecurity extends SecurityOperation implements Authorizor,
Au
     if (instance == null || instance.state != state) {
       instance = new WalkingSecurity(state);
       state.set(tableExists, Boolean.toString(false));
+      state.set(namespaceExists, Boolean.toString(false));
       state.set(authsMap, new HashMap<String,Integer>());
     }
 
@@ -344,6 +345,10 @@ public class WalkingSecurity extends SecurityOperation implements Authorizor,
Au
     return Boolean.parseBoolean(state.getString(tableExists));
   }
 
+  public boolean getNamespaceExists() {
+    return Boolean.parseBoolean(state.getString(namespaceExists));
+  }
+
   public TCredentials getSysCredentials() {
     return new Credentials(getSysUserName(), getSysToken()).toThrift(this.state.getInstance());
   }


Mime
View raw message