@Override
  public Map<String, TableDescriptor> getAll() throws IOException {
    Map<String, TableDescriptor> tds = new ConcurrentSkipListMap<>();
    if (fsvisited) {
      for (Map.Entry<TableName, TableDescriptor> entry : this.cache.entrySet()) {
        tds.put(entry.getKey().getNameWithNamespaceInclAsString(), entry.getValue());
      }
    } else {
      LOG.info("Fetching table descriptors from the filesystem.");
      final long startTime = EnvironmentEdgeManager.currentTime();
      AtomicBoolean allvisited = new AtomicBoolean(usecache);
      List<Path> tableDirs = FSUtils.getTableDirs(fs, rootdir);
      if (!tableDescriptorParallelLoadEnable) {
        for (Path dir : tableDirs) {
          internalGet(dir, tds, allvisited);
        }
      } else {
        CountDownLatch latch = new CountDownLatch(tableDirs.size());
        for (Path dir : tableDirs) {
          executor.submit(new Runnable() {
            @Override
            public void run() {
              try {
                internalGet(dir, tds, allvisited);
              } finally {
                latch.countDown();
              }
            }
          });
        }
        try {
          latch.await();
        } catch (InterruptedException ie) {
          throw (InterruptedIOException) new InterruptedIOException().initCause(ie);
        }
      }
      fsvisited = allvisited.get();
      LOG.info("Fetched table descriptors(size=" + tds.size() + ") cost "
        + (EnvironmentEdgeManager.currentTime() - startTime) + "ms.");
    }
    return tds;
  }
Returns a map from table name to table descriptor for all tables.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java