code: private boolean isTruncationNeeded(PerJVMInfo lInfo,
        Map<Task, Map<LogName, LogFileDetail>> taskLogFileDetails,
        LogName logName) {
      boolean truncationNeeded = false;
      LogFileDetail logFileDetail = null;
      for (Task task : lInfo.allAttempts) {
        long taskRetainSize =
            (task.isMapTask() ? mapRetainSize : reduceRetainSize);
        Map<LogName, LogFileDetail> allLogsFileDetails =
            taskLogFileDetails.get(task);
        logFileDetail = allLogsFileDetails.get(logName);
        if (taskRetainSize > MINIMUM_RETAIN_SIZE_FOR_TRUNCATION
            && logFileDetail.length > taskRetainSize) {
          truncationNeeded = true;
          break;
        }
      }
      return truncationNeeded;
    }
docs: Check if truncation of logs is needed for the given jvmInfo. If all the
  tasks that ran in a JVM are within the log-limits, then truncation is not
  needed. Otherwise it is needed.
  
  @param lInfo
  @param taskLogFileDetails
  @param logName
  @return true if truncation is needed, false otherwise