hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1452160 - in /hbase/branches/0.95: hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java
Date Mon, 04 Mar 2013 00:52:42 GMT
Author: stack
Date: Mon Mar  4 00:52:42 2013
New Revision: 1452160

URL: http://svn.apache.org/r1452160
Log:
HBASE-7966 ACL tests fail on trunk (flaky)

Modified:
    hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java

Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1452160&r1=1452159&r2=1452160&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Mon Mar  4 00:52:42 2013
@@ -869,18 +869,18 @@ public class HConnectionManager {
     }
 
     /*
-     * @param True if table is online
+     * @param enabled True if table is enabled
      */
-    private boolean testTableOnlineState(byte [] tableName, boolean online)
+    private boolean testTableOnlineState(byte [] tableName, boolean enabled)
     throws IOException {
       if (Bytes.equals(tableName, HConstants.ROOT_TABLE_NAME)) {
         // The root region is always enabled
-        return online;
+        return enabled;
       }
       String tableNameStr = Bytes.toString(tableName);
       ZooKeeperKeepAliveConnection zkw = getKeepAliveZooKeeperWatcher();
       try {
-        if (online) {
+        if (enabled) {
           return ZKTableReadOnly.isEnabledTable(zkw, tableNameStr);
         }
         return ZKTableReadOnly.isDisabledTable(zkw, tableNameStr);

Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java?rev=1452160&r1=1452159&r2=1452160&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java
Mon Mar  4 00:52:42 2013
@@ -27,6 +27,7 @@ import java.security.PrivilegedException
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
+import java.io.IOException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -90,7 +91,14 @@ public class TestAccessControlFilter {
   @Test
   public void testQualifierAccess() throws Exception {
     final HTable table = TEST_UTIL.createTable(TABLE, FAMILY);
+    try {
+      doQualifierAccess(table);
+    } finally {
+      table.close();
+    }
+  }
 
+  private void doQualifierAccess(final HTable table) throws IOException, InterruptedException
{
     // set permissions
     ADMIN.runAs(new PrivilegedExceptionAction<Object>() {
       @Override



Mime
View raw message