HBASE-12799 ITAG fails with java.lang.RuntimeException if table does not exist
This commit is contained in:
parent
2ba6053163
commit
24bcebdeeb
@ -17,28 +17,27 @@
|
||||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.client.*;
|
||||
import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy;
|
||||
import org.apache.hadoop.hbase.testclassification.IntegrationTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.apache.hadoop.util.ToolRunner;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* This Integration Test verifies acid guarantees across column families by frequently writing
|
||||
* values to rows with multiple column families and concurrently reading entire rows that expect all
|
||||
* column families.
|
||||
*
|
||||
* <p>
|
||||
* Sample usage:
|
||||
* <pre>
|
||||
* hbase org.apache.hadoop.hbase.IntegrationTestAcidGuarantees -Dmillis=10000 -DnumWriters=50
|
||||
* -DnumGetters=2 -DnumScanners=2 -DnumUniqueRows=5
|
||||
* </pre>
|
||||
*/
|
||||
@Category(IntegrationTests.class)
|
||||
public class IntegrationTestAcidGuarantees extends IntegrationTestBase {
|
||||
|
@ -3170,17 +3170,21 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
||||
} finally {
|
||||
meta.close();
|
||||
}
|
||||
// So, all regions are in the meta table but make sure master knows of the assignments before
|
||||
// returing -- sometimes this can lag.
|
||||
HMaster master = getHBaseCluster().getMaster();
|
||||
final RegionStates states = master.getAssignmentManager().getRegionStates();
|
||||
waitFor(timeout, 200, new Predicate<IOException>() {
|
||||
@Override
|
||||
public boolean evaluate() throws IOException {
|
||||
List<HRegionInfo> hris = states.getRegionsOfTable(tableName);
|
||||
return hris != null && !hris.isEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
// check from the master state if we are using a mini cluster
|
||||
if (!getHBaseClusterInterface().isDistributedCluster()) {
|
||||
// So, all regions are in the meta table but make sure master knows of the assignments before
|
||||
// returing -- sometimes this can lag.
|
||||
HMaster master = getHBaseCluster().getMaster();
|
||||
final RegionStates states = master.getAssignmentManager().getRegionStates();
|
||||
waitFor(timeout, 200, new Predicate<IOException>() {
|
||||
@Override
|
||||
public boolean evaluate() throws IOException {
|
||||
List<HRegionInfo> hris = states.getRegionsOfTable(tableName);
|
||||
return hris != null && !hris.isEmpty();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user