code: public int countOccupiedMapSlots() {
      int mapSlotsCount = 0;
      for (Iterator<TaskStatus> it = taskReports.iterator(); it.hasNext();) {
        TaskStatus ts = (TaskStatus) it.next();
        if (ts.getIsMap() && isTaskRunning(ts)) {
          mapSlotsCount += ts.getNumSlots();
        }
      }
      return mapSlotsCount;
    }
docs: Get the number of occupied map slots.
  @return the number of occupied map slots