@Override
    public boolean accept(Path path) {
      String dirName = path.getName();
      return ((dirName.startsWith("date="))
              && (dirName.compareTo(expiredDatePtn) <= 0));
    }
Path filters to include only expired date partitions based on TTL.
metastore/src/java/org/apache/hadoop/hive/metastore/HiveProtoEventsCleanerTask.java