HBASE-17212 Should add null checker on table name in HTable and RegionServerCallable constructor (addendum)
This commit is contained in:
parent
edcac04ac1
commit
b3627ef51e
|
@ -60,9 +60,6 @@ public abstract class RegionServerCallable<T> implements RetryingCallable<T> {
|
||||||
*/
|
*/
|
||||||
public RegionServerCallable(Connection connection, TableName tableName, byte [] row) {
|
public RegionServerCallable(Connection connection, TableName tableName, byte [] row) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
if (tableName == null) {
|
|
||||||
throw new IllegalArgumentException("Given tableName is null");
|
|
||||||
}
|
|
||||||
this.tableName = tableName;
|
this.tableName = tableName;
|
||||||
this.row = row;
|
this.row = row;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +73,7 @@ public abstract class RegionServerCallable<T> implements RetryingCallable<T> {
|
||||||
@Override
|
@Override
|
||||||
public void prepare(final boolean reload) throws IOException {
|
public void prepare(final boolean reload) throws IOException {
|
||||||
// check table state if this is a retry
|
// check table state if this is a retry
|
||||||
if (reload &&
|
if (reload && tableName != null &&
|
||||||
!tableName.equals(TableName.META_TABLE_NAME) &&
|
!tableName.equals(TableName.META_TABLE_NAME) &&
|
||||||
getConnection().isTableDisabled(tableName)) {
|
getConnection().isTableDisabled(tableName)) {
|
||||||
throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");
|
throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class TestRpcControllerFactory {
|
||||||
super.setPriority(tn);
|
super.setPriority(tn);
|
||||||
// ignore counts for system tables - it could change and we really only want to check on what
|
// ignore counts for system tables - it could change and we really only want to check on what
|
||||||
// the client should change
|
// the client should change
|
||||||
if (!tn.isSystemTable()) {
|
if (tn != null && !tn.isSystemTable()) {
|
||||||
TABLE_PRIORITY.incrementAndGet();
|
TABLE_PRIORITY.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue