From 2db99eb74a5f6ce01d991650a61f9dbdd44249c7 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Thu, 11 May 2017 00:36:44 +0800 Subject: [PATCH] HBASE-18022: Refine the error message issued with TableNotFoundException when expected table is not the same as the one fetched from meta Signed-off-by: Michael Stack --- .../apache/hadoop/hbase/client/ConnectionImplementation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java index 71b0bb30110..44974cba7cc 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java @@ -859,8 +859,9 @@ class ConnectionImplementation implements ClusterConnection, Closeable { // possible we got a region of a different table... if (!regionInfo.getTable().equals(tableName)) { throw new TableNotFoundException( - "Table '" + tableName + "' was not found, got: " + - regionInfo.getTable() + "."); + "Region of '" + regionInfo.getRegionNameAsString() + "' is expected in the table of '" + tableName + "', " + + "but hbase:meta says it is in the table of '" + regionInfo.getTable() + "'. " + + "hbase:meta might be damaged."); } if (regionInfo.isSplit()) { throw new RegionOfflineException("the only available region for" +