public List<UpgradeCheck> getApplicableChecks(UpgradeCheckRequest request,
      List<UpgradeCheck> upgradeChecks) {

    List<UpgradeCheck> applicableChecks = new LinkedList<>();
    for (UpgradeCheck check : upgradeChecks) {
      // build some required qualifications
      List<CheckQualification> qualifications = Lists.newArrayList(
          new ServiceQualification(check),
          new OrchestrationQualification(check.getClass()),
          new UpgradeTypeQualification(check.getClass()));

      // add any extras from the check
      List<CheckQualification> checkQualifications = check.getQualifications();
      if (CollectionUtils.isNotEmpty(checkQualifications)) {
        qualifications.addAll(checkQualifications);
      }

      // run the applicability check
      try {
        boolean checkIsApplicable = true;
        for (CheckQualification qualification : qualifications) {
          if (!qualification.isApplicable(request)) {
            checkIsApplicable = false;
            break;
          }
        }

        if (checkIsApplicable) {
          applicableChecks.add(check);
        }
      } catch (Exception ex) {
        LOG.error(
            "Unable to determine whether the pre-upgrade check {} is applicable to this upgrade",
            check.getCheckDescription().name(), ex);
      }
    }

    return applicableChecks;
  }
Gets any {@link UpgradeCheck}s which have passed all of their {@link CheckQualification}s
for the given upgrade request.

@param request
@param upgradeChecks
@return
ambari-server/src/main/java/org/apache/ambari/server/state/CheckHelper.java