hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1503361 - in /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase: HBaseTestingUtility.java security/access/TestAccessController.java
Date Mon, 15 Jul 2013 17:33:27 GMT
Author: jxiang
Date: Mon Jul 15 17:33:26 2013
New Revision: 1503361

URL: http://svn.apache.org/r1503361
Log:
HBASE-8662 [rest] support impersonation - ADDENDUM

Modified:
    hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
    hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java

Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1503361&r1=1503360&r2=1503361&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Mon Jul 15 17:33:26 2013
@@ -2137,7 +2137,12 @@ public class HBaseTestingUtility extends
    */
   public void waitTableEnabled(byte[] table)
       throws InterruptedException, IOException {
-    waitTableEnabled(table, 30000);
+    waitTableEnabled(getHBaseAdmin(), table, 30000);
+  }
+
+  public void waitTableEnabled(HBaseAdmin admin, byte[] table)
+      throws InterruptedException, IOException {
+    waitTableEnabled(admin, table, 30000);
   }
 
   /**
@@ -2151,10 +2156,15 @@ public class HBaseTestingUtility extends
    */
   public void waitTableEnabled(byte[] table, long timeoutMillis)
   throws InterruptedException, IOException {
+    waitTableEnabled(getHBaseAdmin(), table, timeoutMillis);
+  }
+
+  public void waitTableEnabled(HBaseAdmin admin, byte[] table, long timeoutMillis)
+  throws InterruptedException, IOException {
     long startWait = System.currentTimeMillis();
     waitTableAvailable(table, timeoutMillis);
     long remainder = System.currentTimeMillis() - startWait;
-    while (!getHBaseAdmin().isTableEnabled(table)) {
+    while (!admin.isTableEnabled(table)) {
       assertTrue("Timed out waiting for table to become available and enabled " +
          Bytes.toStringBinary(table),
          System.currentTimeMillis() - remainder < timeoutMillis);

Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java?rev=1503361&r1=1503360&r2=1503361&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
Mon Jul 15 17:33:26 2013
@@ -892,7 +892,8 @@ public class TestAccessController {
 
       HTable table = new HTable(conf, tableName);
       try {
-        TEST_UTIL.waitTableEnabled(tableName);
+        HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
+        TEST_UTIL.waitTableEnabled(admin, tableName);
         LoadIncrementalHFiles loader = new LoadIncrementalHFiles(conf);
         loader.doBulkLoad(loadPath, table);
       } finally {



Mime
View raw message