private boolean checkFileSizeLimit(HeuristicResult result, Map<String, String> cacheFileToSizeMap) {
    boolean limitViolated = false;
    for (String file : cacheFileToSizeMap.keySet()) {
      long size = 0;
      try {
        size = Long.parseLong(cacheFileToSizeMap.get(file));
      } catch (NumberFormatException e) {
        logger.warn("Unable to parse file size value: " + size + " for file: " + file);
      }

      if (size > distributedCacheFileSizeLimit) {
        limitViolated = true;
        result.addResultDetail(file, Long.toString(size));
      }
    }
    return limitViolated;
  }
Rule flags jobs which put files more than 500MB in the distributed cache.
app/com/linkedin/drelephant/mapreduce/heuristics/DistributedCacheLimitHeuristic.java