private Set<String> targetOsFamilies(UpgradeCheckRequest request) {
    RepositoryVersion repositoryVersion = request.getTargetRepositoryVersion();
    RepositoryVersionEntity entity = repositoryVersionDaoProvider.get().findByPK(
        repositoryVersion.getId());

    return entity
      .getRepoOsEntities()
      .stream()
      .map(RepoOsEntity::getFamily)
      .collect(toSet());
  }
@return set of each os family in the target repository
ambari-server/src/main/java/org/apache/ambari/server/checks/MissingOsInRepoVersionCheck.java