private Boolean isAllTasksCompleted(Long requestId) {
    Boolean result = Boolean.TRUE;
    for (Map.Entry<Long, HostRoleCommand> entry : activeTasksMap.entrySet()) {
      if (entry.getValue().getRequestId() == requestId && !entry.getValue().getStatus().isCompletedState()) {
        result = Boolean.FALSE;
      }
    }
    return result;
  }
@param requestId request Id
@return  <code>false</code> if any of the task belonging to requestId has incomplete status
         <code>true</code> otherwise
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListener.java