code: int computeNumSlotsPerReduce(long slotSizePerReduce) {
      if ((slotSizePerReduce==DISABLED_MEMORY_LIMIT) ||
          (getMemoryForReduceTask()==DISABLED_MEMORY_LIMIT)) {
        return 1;
      }
      return
      (int)(Math.ceil((float)getMemoryForReduceTask() / (float)slotSizePerReduce));
    }
docs: Compute the number of slots required to run a single reduce task-attempt
  of this job.
  @param slotSizePerReduce cluster-wide value of the amount of memory
  required to run a reduce-task
  @return the number of slots required to run a single reduce task-attempt
  1 if memory parameters are disabled.