accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [06/16] git commit: Tests pass
Date Mon, 22 Sep 2014 20:48:06 GMT
Tests pass



git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/ACCUMULO-CURATOR@1496180 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/ACCUMULO-CURATOR
Commit: bc335f7a41f20fa7853e7972926910791a5e581d
Parents: cba8ab6
Author: John Vines <vines@apache.org>
Authored: Mon Jun 24 19:48:16 2013 +0000
Committer: John Vines <vines@apache.org>
Committed: Mon Jun 24 19:48:16 2013 +0000

----------------------------------------------------------------------
 .../accumulo/core/client/admin/InstanceOperationsImpl.java     | 2 +-
 .../main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java | 1 +
 proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java  | 2 +-
 .../accumulo/server/security/handler/ZKAuthenticator.java      | 6 +++++-
 4 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc335f7a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
index 44f6554..2fbd45c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
@@ -141,7 +141,7 @@ public class InstanceOperationsImpl implements InstanceOperations {
     String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
     List<String> results = new ArrayList<String>();
     for (ChildData candidate : cache.getChildren(path)) {
-      List<ChildData> children = cache.getChildren(path + "/" + candidate);
+      List<ChildData> children = cache.getChildren(candidate.getPath());
       if (children != null && children.size() > 0) {
         List<ChildData> copy = new ArrayList<ChildData>(children);
         Collections.sort(copy);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc335f7a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
index 14bb300..a1b1dc1 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
@@ -68,6 +68,7 @@ public class ZooCache {
         cache.getListenable().addListener(listener);
       }
       try {
+        log.debug("Starting cache against " + zPath + (listener!=null? " using listener "
+ listener:""));
         cache.start(StartMode.BUILD_INITIAL_CACHE);
         // I'll do it myself!
         if (listener != null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc335f7a/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
----------------------------------------------------------------------
diff --git a/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java b/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
index 298d7eb..072f862 100644
--- a/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
+++ b/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
@@ -1141,6 +1141,6 @@ public class SimpleTest {
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();
-    folder.delete();
+//    folder.delete();
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc335f7a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
index 80611fd..7878cb9 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
@@ -32,6 +32,7 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
@@ -189,7 +190,10 @@ public final class ZKAuthenticator implements Authenticator {
     PasswordToken pt = (PasswordToken) token;
     byte[] pass;
     String zpath = ZKUserPath + "/" + principal;
-    pass = zooCache.get(zpath).getData();
+    ChildData cd = zooCache.get(zpath);
+    if (cd == null)
+      return false;
+    pass = cd.getData();
     boolean result = ZKSecurityTool.checkPass(pt.getPassword(), pass);
     return result;
   }


Mime
View raw message