@Override
    public int compare(Entry lhs, Entry rhs) {
      if (lhs.getHighWaterMarkPercent() > rhs.getHighWaterMarkPercent()) {
        return -1;
      } else if (lhs.getHighWaterMarkPercent() < rhs.getHighWaterMarkPercent()) {
        return 1;
      } else if (lhs.getLowWaterMarkPercent() > rhs.getLowWaterMarkPercent()) {
        return -1;
      } else if (lhs.getLowWaterMarkPercent() < rhs.getLowWaterMarkPercent()) {
        return 1;
      }
      return 0;
    }
A comparator that orders {@link Entry} instances in descending order first by
high water mark and then by low water mark.
samza-core/src/main/java/org/apache/samza/container/disk/WatermarkDiskQuotaPolicy.java