@Override
  @Nullable
  public TableDescriptor get(TableName tableName) {
    invocations++;
    if (usecache) {
      // Look in cache of descriptors.
      TableDescriptor cachedtdm = this.cache.get(tableName);
      if (cachedtdm != null) {
        cachehits++;
        return cachedtdm;
      }
      // we do not need to go to fs any more
      if (fsvisited) {
        return null;
      }
    }
    TableDescriptor tdmt = null;
    try {
      tdmt = getTableDescriptorFromFs(fs, getTableDir(tableName), fsreadonly).map(Pair::getSecond)
        .orElse(null);
    } catch (IOException ioe) {
      LOG.debug("Exception during readTableDecriptor. Current table name = " + tableName, ioe);
    }
    // last HTD written wins
    if (usecache && tdmt != null) {
      this.cache.put(tableName, tdmt);
    }

    return tdmt;
  }
Get the current table descriptor for the given table, or null if none exists.
<p/>
Uses a local cache of the descriptor but still checks the filesystem on each call if
{@link #fsvisited} is not {@code true}, i.e, we haven't done a full scan yet, to see if a newer
file has been created since the cached one was read.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java