private void updateActiveTasksMap(List<HostRoleCommand> hostRoleCommandWithReceivedStatus) {
    for (HostRoleCommand hostRoleCommand : hostRoleCommandWithReceivedStatus) {
      Long taskId = hostRoleCommand.getTaskId();
      activeTasksMap.put(taskId , hostRoleCommand);
    }
  }
update changed host role command status
@param hostRoleCommandWithReceivedStatus list of host role commands reported
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListener.java