private long getSpace(FileStatus f) {
        Long cached = directorySpaces.get(f);
        if (cached != null) {
          return cached;
        }
        try {
          long space =
            f.isDirectory() ? fs.getContentSummary(f.getPath()).getSpaceConsumed() : f.getLen();
          directorySpaces.put(f, space);
          return space;
        } catch (IOException e) {
          LOG.trace("Failed to get space consumed by path={}", f, e);
          return -1;
        }
      }
Sort the given list in (descending) order of the space each element takes
@param dirs the list to sort, element in it should be directory (not file)
hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/CleanerChore.java