HBASE-8662 [rest] support impersonation - ADDENDUM
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1503360 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0bed86e6de
commit
eef2e34797
|
@ -2128,7 +2128,12 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2141,11 +2146,16 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
* @throws IOException
|
||||
*/
|
||||
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);
|
||||
|
@ -2157,7 +2167,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
// Below we do a get. The get will retry if a NotServeringRegionException or a
|
||||
// RegionOpeningException. It is crass but when done all will be online.
|
||||
try {
|
||||
Canary.sniff(getHBaseAdmin(), Bytes.toString(table));
|
||||
Canary.sniff(admin, Bytes.toString(table));
|
||||
} catch (Exception e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
|
|
@ -893,7 +893,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 {
|
||||
|
|
Loading…
Reference in New Issue