From ff84a7ae16eb4f8ce41552808d97e9dc28c87f10 Mon Sep 17 00:00:00 2001 From: nkeywal Date: Wed, 6 Nov 2013 18:31:54 +0000 Subject: [PATCH] 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 --- .../src/main/java/org/apache/hadoop/hbase/client/HTable.java | 5 +++++ .../org/apache/hadoop/hbase/master/AssignmentManager.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 00de79e6289..93305e5cf09 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -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. diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 54d47982b55..9f1ce5307bf 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -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) {