private void generateInvalidTopologyException(Map<String, Map<String, Collection<DependencyInfo>>> dependenciesIssues,
                                                Collection<String> cardinalityFailures) throws InvalidTopologyException {

    //todo: encapsulate some of this in exception?
    String msg = "Cluster Topology validation failed.";
    if (! cardinalityFailures.isEmpty()) {
      msg += "  Invalid service component count: " + cardinalityFailures;
    }
    if (! dependenciesIssues.isEmpty()) {
      msg += " Component dependencies issues: " + dependenciesIssues;
    }
    msg += ".  To disable topology validation and create the blueprint, " +
        "add the following to the end of the url: '?validate_topology=false'";
    throw new InvalidTopologyException(msg);
  }
Generate an exception for topology validation failure.

@param dependenciesIssues  dependency issues information,
                           like component needs to be co-hosted,
                           or components can't be installed on the same host
@param cardinalityFailures  missing service component information

@throws IllegalArgumentException  Always thrown and contains information regarding the topology validation failure
                                  in the msg
ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java