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 <stack@apache.org>
This commit is contained in:
Xiang Li 2017-05-11 00:36:44 +08:00 committed by Michael Stack
parent 3dcb03947c
commit 2db99eb74a
1 changed files with 3 additions and 2 deletions

View File

@ -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" +