code: public void resetRunningTasks(TaskType type) {
      Map<String, Integer> runningMap = (type == TaskType.MAP ?
                                         poolRunningMaps : poolRunningReduces);
      for (String poolName : runningMap.keySet()) {
        runningMap.put(poolName, 0);
      }
    }
docs: Set the number of running tasks in all pools to zero
  @param type type of task to be set