public static boolean isTableDir(FileSystem fs, Path tableDir) throws IOException {
    return getTableDescriptorFromFs(fs, tableDir, true).isPresent();
  }
Check whether we have a valid TableDescriptor.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java