public boolean isTableState(TableName tableName, TableState.State... states) {
    try {
      TableState tableState = getTableState(tableName);
      return tableState.isInStates(states);
    } catch (IOException e) {
      LOG.error("Unable to get table " + tableName + " state", e);
      // XXX: is it safe to just return false here?
      return false;
    }
  }
Set table state to provided. Caller should lock table on write.
@param tableName table to change state for
@param newState  new state
hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java