HBASE-12165 TestEndToEndSplitTransaction.testFromClientSideWhileSplitting fails -- DEBUGGING STRINGS
This commit is contained in:
parent
a17614d5b2
commit
da9f2434b2
|
@ -235,7 +235,7 @@ public class TestEndToEndSplitTransaction {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
for (int i=0; i< 5; i++) {
|
for (int i= 0; i< 5; i++) {
|
||||||
NavigableMap<HRegionInfo, ServerName> regions = MetaScanner.allTableRegions(conf, null,
|
NavigableMap<HRegionInfo, ServerName> regions = MetaScanner.allTableRegions(conf, null,
|
||||||
tableName, false);
|
tableName, false);
|
||||||
if (regions.size() == 0) {
|
if (regions.size() == 0) {
|
||||||
|
@ -341,7 +341,7 @@ public class TestEndToEndSplitTransaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
void verifyTableRegions(Set<HRegionInfo> regions) {
|
void verifyTableRegions(Set<HRegionInfo> regions) {
|
||||||
log("Verifying " + regions.size() + " regions");
|
log("Verifying " + regions.size() + " regions: " + regions);
|
||||||
|
|
||||||
byte[][] startKeys = new byte[regions.size()][];
|
byte[][] startKeys = new byte[regions.size()][];
|
||||||
byte[][] endKeys = new byte[regions.size()][];
|
byte[][] endKeys = new byte[regions.size()][];
|
||||||
|
@ -428,14 +428,16 @@ public class TestEndToEndSplitTransaction {
|
||||||
Table metaTable = new HTable(conf, TableName.META_TABLE_NAME);
|
Table metaTable = new HTable(conf, TableName.META_TABLE_NAME);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (System.currentTimeMillis() - start < timeout) {
|
Result result = null;
|
||||||
Result result = getRegionRow(metaTable, regionName);
|
HRegionInfo region = null;
|
||||||
|
while ((System.currentTimeMillis() - start) < timeout) {
|
||||||
|
result = getRegionRow(metaTable, regionName);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRegionInfo region = HRegionInfo.getHRegionInfo(result);
|
region = HRegionInfo.getHRegionInfo(result);
|
||||||
if(region.isSplitParent()) {
|
if (region.isSplitParent()) {
|
||||||
log("found parent region: " + region.toString());
|
log("found parent region: " + region.toString());
|
||||||
PairOfSameType<HRegionInfo> pair = HRegionInfo.getDaughterRegions(result);
|
PairOfSameType<HRegionInfo> pair = HRegionInfo.getDaughterRegions(result);
|
||||||
daughterA = pair.getFirst();
|
daughterA = pair.getFirst();
|
||||||
|
@ -444,6 +446,11 @@ public class TestEndToEndSplitTransaction {
|
||||||
}
|
}
|
||||||
Threads.sleep(100);
|
Threads.sleep(100);
|
||||||
}
|
}
|
||||||
|
if (daughterA == null || daughterB == null) {
|
||||||
|
throw new IOException("Failed to get daughters, daughterA=" + daughterA + ", daughterB=" +
|
||||||
|
daughterB + ", timeout=" + timeout + ", result=" + result + ", regionName=" + regionName +
|
||||||
|
", region=" + region);
|
||||||
|
}
|
||||||
|
|
||||||
//if we are here, this means the region split is complete or timed out
|
//if we are here, this means the region split is complete or timed out
|
||||||
if (waitForDaughters) {
|
if (waitForDaughters) {
|
||||||
|
|
Loading…
Reference in New Issue