private static Configuration createConfiguration(TreeNode<Resource> clusterNode) {
    Map<String, Map<String, String>> properties = new HashMap<>();
    Map<String, Map<String, Map<String, String>>> attributes = new HashMap<>();

    Map<String, Object> desiredConfigMap = clusterNode.getObject().getPropertiesMap().get("Clusters/desired_configs");
    TreeNode<Resource> configNode = clusterNode.getChild("configurations");
    for (TreeNode<Resource> config : configNode.getChildren()) {
      ExportedConfiguration configuration = new ExportedConfiguration(config);
      DesiredConfig desiredConfig = (DesiredConfig) desiredConfigMap.get(configuration.getType());
      if (desiredConfig != null && desiredConfig.getTag().equals(configuration.getTag())) {
        properties.put(configuration.getType(), configuration.getProperties());
        attributes.put(configuration.getType(), configuration.getPropertyAttributes());
      }
    }

    Configuration configuration = new Configuration(properties, attributes);
    configuration.setParentConfiguration(new Configuration(Collections.emptyMap(), Collections.emptyMap()));

    return configuration;
  }
Process cluster scoped configurations.

@param clusterNode  cluster node
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java