hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [1/4] hbase git commit: HBASE-17091 IntegrationTestZKAndFSPermissions failed with 'KeeperException'
Date Tue, 15 Nov 2016 21:31:48 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 e54826434 -> bf0483c37
  refs/heads/branch-1.1 a268d4cf5 -> a8628ee9a
  refs/heads/branch-1.2 c1701571d -> e7b310e68
  refs/heads/master 8847a7090 -> d40a0c3bd


HBASE-17091 IntegrationTestZKAndFSPermissions failed with 'KeeperException'


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

Branch: refs/heads/master
Commit: d40a0c3bd88b7098437050eeb3e3f5c6ef5f5502
Parents: 8847a70
Author: Enis Soztutar <enis@apache.org>
Authored: Tue Nov 15 13:09:25 2016 -0800
Committer: Enis Soztutar <enis@apache.org>
Committed: Tue Nov 15 13:09:25 2016 -0800

----------------------------------------------------------------------
 .../hbase/test/IntegrationTestZKAndFSPermissions.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d40a0c3b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestZKAndFSPermissions.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestZKAndFSPermissions.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestZKAndFSPermissions.java
index 9d30b7c..0d85e42 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestZKAndFSPermissions.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestZKAndFSPermissions.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.Code;
+import org.apache.zookeeper.KeeperException.NoNodeException;
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.apache.zookeeper.ZooDefs.Perms;
 import org.apache.zookeeper.data.ACL;
@@ -168,7 +169,7 @@ public class IntegrationTestZKAndFSPermissions extends AbstractHBaseTool
{
       }
     } catch (KeeperException ke) {
       // if we are not authenticated for listChildren, it is fine.
-      if (ke.code() != Code.NOAUTH) {
+      if (ke.code() != Code.NOAUTH && ke.code() != Code.NONODE) {
         throw ke;
       }
     }
@@ -177,7 +178,14 @@ public class IntegrationTestZKAndFSPermissions extends AbstractHBaseTool
{
   private void assertZnodePerms(RecoverableZooKeeper zk, String znode,
       boolean expectedWorldReadable) throws KeeperException, InterruptedException {
     Stat stat = new Stat();
-    List<ACL> acls = zk.getZooKeeper().getACL(znode, stat);
+    List<ACL> acls;
+    try {
+      acls = zk.getZooKeeper().getACL(znode, stat);
+    } catch (NoNodeException ex) {
+      LOG.debug("Caught exception for missing znode", ex);
+      // the znode is deleted. Probably it was a temporary znode (like RIT).
+      return;
+    }
     String[] superUsers = superUser == null ? null : superUser.split(",");
 
     LOG.info("Checking ACLs for znode znode:" + znode + " acls:" + acls);


Mime
View raw message