Skip to content

Commit e655f24

Browse files
JackShi148shenyunlong
authored andcommitted
fix tableExists namespace not exists throw exception
1 parent 975f59e commit e655f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/alipay/oceanbase/hbase/util/OHAdmin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public boolean tableExists(TableName tableName) throws IOException {
8080
int errCode = ((ObTableException) cause).getErrorCode();
8181
// if the original cause is database_not_exist, means namespace in tableName does not exist
8282
// for HBase, namespace not exist will not throw exceptions but will return false
83-
if (errCode == ResultCodes.OB_ERR_BAD_DATABASE.errorCode) {
83+
if (errCode == ResultCodes.OB_KV_HBASE_NAMESPACE_NOT_FOUND.errorCode) {
8484
return false;
8585
}
8686
}

0 commit comments

Comments
 (0)