public List<UpgradeCheck> getFilteredUpgradeChecks(UpgradePack upgradePack) throws AmbariException {
    List<UpgradeCheck> builtInRequiredChecks = new ArrayList<>();

    // iterate over all of the built-in checks, dropping any which are not
    // required for the upgrade pack's upgrade type
    for (UpgradeCheck builtInCheck : m_builtInChecks) {
      if (isBuiltInCheckRequired(builtInCheck, upgradePack.getType())) {
        builtInRequiredChecks.add(builtInCheck);
      }
    }

    // for any checks defined in the upgrade pack, add them since they have been
    // explicitely defined
    PluginUpgradeChecks pluginChecks = m_pluginChecks.get(upgradePack);

    // see if the upgrade checks have been processes for this pack yet
    if (null == pluginChecks) {
      pluginChecks = new PluginUpgradeChecks(new TreeSet<>(new PreUpgradeCheckComparator()),
          new TreeSet<>());

      m_pluginChecks.put(upgradePack, pluginChecks);

      List<String> pluginCheckClassNames = upgradePack.getPrerequisiteChecks();
      if (null != pluginCheckClassNames && !pluginCheckClassNames.isEmpty()) {
        loadPluginUpgradeChecksFromStack(upgradePack, pluginChecks);
      }
    }

    final Set<UpgradeCheck> combinedUpgradeChecks = new TreeSet<>(new PreUpgradeCheckComparator());
    combinedUpgradeChecks.addAll(builtInRequiredChecks);
    combinedUpgradeChecks.addAll(pluginChecks.m_loadedChecks);

    return new LinkedList<>(combinedUpgradeChecks);
  }
Gets the ordered upgrade checks which should execute for the specified
upgrade pack. This list of checks will include required built-in checks
from Ambari and plugin checks loaded from the upgrade pack.
<p>
This collection of upgrade checks will be further scrutinized via
{@link CheckQualification}s to determine if they indeed need to run by the
{@link CheckHelper}.

@param upgradePack
         Upgrade pack object with the list of required checks to be
         included
@return
ambari-server/src/main/java/org/apache/ambari/server/checks/UpgradeCheckRegistry.java