code: public static String getReasoning(final BlockedAdmissionReason reason,
        final int reasonLimit, final int reasonActualValue,
        final int hardAdmissionPosition,
        JobAdmissionWaitInfo jobAdmissionWaitInfo) {
      if (reason == BlockedAdmissionReason.HARD_CLUSTER_WIDE_MAX_TASKS_EXCEEDED) {
        if (jobAdmissionWaitInfo == null) {
          return reason.toString() + ".";
        } else {
          StringBuffer sb = new StringBuffer();
          sb.append(reason.toString() + ".  In order to protect the jobtracker " +
          		"from exceeding hard memory limits based on the number of " +
          		"total tracked tasks, the cluster is now in cluster-wide " +
          		"hard admission control and accepts jobs on a first come, " +
          		"first served (FIFO) basis.  Your job will be admitted " +
          		"according to this policy.");
          if (jobAdmissionWaitInfo.getAverageCount() > 0) {
            sb.append(" The past " + jobAdmissionWaitInfo.getAverageCount() +
                " jobs admitted while in hard admission control were " +
                "added in an average of " +
                jobAdmissionWaitInfo.getAverageWaitMsecsPerHardAdmissionJob() +
                " msecs, giving this job a rough estimated wait time of " +
                (jobAdmissionWaitInfo.getAverageWaitMsecsPerHardAdmissionJob() *
                    (hardAdmissionPosition + 1)) + " msecs.");
          }
          return sb.toString();
        }
      } else if (reason ==
          BlockedAdmissionReason.SOFT_CLUSTER_WIDE_MAX_TASKS_EXCEEEDED) {
        return reason.toString() + ".";
      } else {
        return reason.toString() + " " + reasonActualValue +
          " exceeds " + reasonLimit + ".";
      }
    }
docs: Compose the reason message.
  
  @param reason Reason why not admitted
  @param reasonLimit Limit exceeded
  @param reasonActualValue Actual value that exceed limit
  @param hardAdmissionPosition If in hard admission control, position in
  the queue
  @return String explaining the issue