From 3acc42a93e82588c44e89049e00e27e794adb099 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 --- .../org/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 6859cb306d..f0f5cf583f 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 @@ -842,8 +842,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" + -- 2.11.0 (Apple Git-81)