private Set<Long> findAllRequestIdsFromUpgrade() {
    EntityManager entityManager = entityManagerProvider.get();
    TypedQuery<Long> upgradeQuery =
            entityManager.createNamedQuery("UpgradeEntity.findAllRequestIds", Long.class);

    return Sets.newHashSet(daoUtils.selectList(upgradeQuery));
  }
Search for all request ids in Upgrade table
@return the list of request ids
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java