HBASE-9001 Add a toString in HTable, fix a log in AssignmentManager

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1539425 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nkeywal 2013-11-06 18:31:54 +00:00
parent b4921b03b0
commit ff84a7ae16
2 changed files with 7 additions and 2 deletions

View File

@ -1523,6 +1523,11 @@ public class HTable implements HTableInterface {
return operationTimeout;
}
@Override
public String toString() {
return tableName + ", " + connection;
}
/**
* Run basic test.
* @param args Pass table name and row and will get the content.

View File

@ -2839,12 +2839,12 @@ public class AssignmentManager extends ZooKeeperListener {
public boolean waitOnRegionToClearRegionsInTransition(final HRegionInfo hri, long timeOut)
throws InterruptedException {
if (!regionStates.isRegionInTransition(hri)) return true;
RegionState rs = null;
long end = (timeOut <= 0) ? Long.MAX_VALUE : EnvironmentEdgeManager.currentTimeMillis()
+ timeOut;
// There is already a timeout monitor on regions in transition so I
// should not have to have one here too?
LOG.info("Waiting on " + rs + " to clear regions-in-transition");
LOG.info("Waiting for " + hri.getEncodedName() +
" to leave regions-in-transition, timeOut=" + timeOut + " ms.");
while (!this.server.isStopped() && regionStates.isRegionInTransition(hri)) {
regionStates.waitForUpdate(100);
if (EnvironmentEdgeManager.currentTimeMillis() > end) {