@VisibleForTesting
  void validateConfiguration() {
    Configuration config = request.getConfiguration();

    if (strictValidation()) {
      for (String type : NOT_ALLOWED_CONFIG_TYPES) {
        CHECK.checkArgument(!config.getProperties().containsKey(type), "Cannot change '%s' configuration in Add Service request", type);
      }
    }

    Configuration clusterConfig = getClusterDesiredConfigs();
    clusterConfig.setParentConfiguration(state.getStack().getDefaultConfig());
    config.setParentConfiguration(clusterConfig);

    UnitUpdater.removeUnits(config, state.getStack()); // stack advisor doesn't like units; they'll be added back after recommendation
    state = state.with(config);
  }
Create an {@link AddServiceInfo} based on the validated request.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/RequestValidator.java