private static String millisToHumanReadableStr(long milliseconds){
    int min, hour, days;
    min = (int)(milliseconds / MILLISECONDS_PER_MINUTE);
    days = min / MINUTES_PER_DAY;
    min = min % MINUTES_PER_DAY;
    hour = min / MINUTES_PER_HOUR;
    min = min % MINUTES_PER_HOUR;
    String result = "";
    if(days > 0) {
      result += days + "d ";
    }
    if(hour > 0) {
      result += hour + "h ";
    }
    if(min > 0) {
      result += min + "m ";
    }
    return result.trim();
  }
Converts given {@code milliseconds} to human-readable {@link String} like "1d 2h 3m" or "2h 4m".
@param milliseconds milliseconds to convert
@return human-readable string
ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java