public Set<RoleCommandPair> getHostRolesInProgress() {
    Set<RoleCommandPair> commandsToScheduleSet = new HashSet<>();
    for (Map.Entry<String, Map<String, HostRoleCommand>> hostRoleCommandEntry : hostRoleCommands.entrySet()) {
      for (Map.Entry<String, HostRoleCommand> roleCommandEntry : hostRoleCommandEntry.getValue().entrySet()) {
        if (HostRoleStatus.IN_PROGRESS_STATUSES.contains(roleCommandEntry.getValue().getStatus())) {
          commandsToScheduleSet.add(
            new RoleCommandPair(roleCommandEntry.getValue().getRole(), roleCommandEntry.getValue().getRoleCommand()));
        }
      }
    }
    return commandsToScheduleSet;
  }
Returns <Role, RoleCommand> pairs which are in progress.
@return
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java