code: public int getRunningTasks(String poolName, TaskType type) {
      Map<String, Integer> runningMap = (type == TaskType.MAP ?
                                         poolRunningMaps : poolRunningReduces);
      return (runningMap.containsKey(poolName) ?
              runningMap.get(poolName) : 0);
    }
docs: Get the number of running tasks in a pool
  @param poolName name of the pool
  @param type type of task to be set
  @return number of running tasks