static Comparator<TableDescriptor>
    getComparator(Comparator<ColumnFamilyDescriptor> cfComparator) {
    return (TableDescriptor lhs, TableDescriptor rhs) -> {
      int result = lhs.getTableName().compareTo(rhs.getTableName());
      if (result != 0) {
        return result;
      }
      Collection<ColumnFamilyDescriptor> lhsFamilies = Arrays.asList(lhs.getColumnFamilies());
      Collection<ColumnFamilyDescriptor> rhsFamilies = Arrays.asList(rhs.getColumnFamilies());
      result = Integer.compare(lhsFamilies.size(), rhsFamilies.size());
      if (result != 0) {
        return result;
      }

      for (Iterator<ColumnFamilyDescriptor> it = lhsFamilies.iterator(),
          it2 = rhsFamilies.iterator(); it.hasNext();) {
        result = cfComparator.compare(it.next(), it2.next());
        if (result != 0) {
          return result;
        }
      }
      // punt on comparison for ordering, just calculate difference
      return Integer.compare(lhs.getValues().hashCode(), rhs.getValues().hashCode());
    };
  }
TableDescriptor contains the details about an HBase table such as the descriptors of all the
column families, is the table a catalog table, <code> hbase:meta </code>, if the table is read
only, the maximum size of the memstore, when the region split should occur, coprocessors
associated with it etc...
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java