public static List<Path> getLocalTableDirs(final FileSystem fs, final Path rootdir)
    throws IOException {
    // presumes any directory under hbase.rootdir is a table
    FileStatus[] dirs = fs.listStatus(rootdir, new UserTableDirFilter(fs));
    List<Path> tabledirs = new ArrayList<>(dirs.length);
    for (FileStatus dir : dirs) {
      tabledirs.add(dir.getPath());
    }
    return tabledirs;
  }
@return All the table directories under <code>rootdir</code>. Ignore non table hbase folders
        such as .logs, .oldlogs, .corrupt folders.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java