HBASE-444 hbase is very slow at determining table is not present
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@627585 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3067b43dc2
commit
6b8c95d8cd
|
@ -50,7 +50,8 @@ Hbase Change Log
|
||||||
collected
|
collected
|
||||||
HBASE-407 Keep HRegionLocation information in LRU structure
|
HBASE-407 Keep HRegionLocation information in LRU structure
|
||||||
(Bryan Duxbury)
|
(Bryan Duxbury)
|
||||||
|
HBASE-444 hbase is very slow at determining table is not present
|
||||||
|
(Bryan Duxbury)
|
||||||
|
|
||||||
Branch 0.1
|
Branch 0.1
|
||||||
|
|
||||||
|
|
|
@ -421,17 +421,17 @@ public class HConnectionManager implements HConstants {
|
||||||
HRegionInfo regionInfo = (HRegionInfo) Writables.getWritable(
|
HRegionInfo regionInfo = (HRegionInfo) Writables.getWritable(
|
||||||
results.get(COL_REGIONINFO), new HRegionInfo());
|
results.get(COL_REGIONINFO), new HRegionInfo());
|
||||||
|
|
||||||
if (regionInfo.isOffline()) {
|
|
||||||
throw new IllegalStateException("region offline: " +
|
|
||||||
regionInfo.getRegionName());
|
|
||||||
}
|
|
||||||
|
|
||||||
// possible we got a region of a different table...
|
// possible we got a region of a different table...
|
||||||
if (!regionInfo.getTableDesc().getName().equals(tableName)) {
|
if (!regionInfo.getTableDesc().getName().equals(tableName)) {
|
||||||
throw new TableNotFoundException(
|
throw new TableNotFoundException(
|
||||||
"Table '" + tableName + "' was not found.");
|
"Table '" + tableName + "' was not found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (regionInfo.isOffline()) {
|
||||||
|
throw new IllegalStateException("region offline: " +
|
||||||
|
regionInfo.getRegionName());
|
||||||
|
}
|
||||||
|
|
||||||
String serverAddress =
|
String serverAddress =
|
||||||
Writables.bytesToString(results.get(COL_SERVER));
|
Writables.bytesToString(results.get(COL_SERVER));
|
||||||
|
|
||||||
|
@ -457,6 +457,11 @@ public class HConnectionManager implements HConstants {
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
} catch (TableNotFoundException e) {
|
||||||
|
// if we got this error, probably means the table just plain doesn't
|
||||||
|
// exist. rethrow the error immediately. this should always be coming
|
||||||
|
// from the HTable constructor.
|
||||||
|
throw e;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (e instanceof RemoteException) {
|
if (e instanceof RemoteException) {
|
||||||
e = RemoteExceptionHandler.decodeRemoteException(
|
e = RemoteExceptionHandler.decodeRemoteException(
|
||||||
|
|
Loading…
Reference in New Issue