@VisibleForTesting
  Collection<Map<String, Object>> getSettings(TreeNode<Resource> clusterNode, Stack stack) {
    //Initialize collections to create appropriate json structure
    Collection<Map<String, Object>> blueprintSetting = new ArrayList<>();

    Set<Map<String, String>> serviceSettings = new HashSet<>();
    Set<Map<String, String>> componentSettings = new HashSet<>();

    //Fetch the services, to obtain ServiceInfo and ServiceComponents
    Collection<TreeNode<Resource>> serviceChildren = clusterNode.getChild("services").getChildren();
    for (TreeNode<Resource> serviceNode : serviceChildren) {
      ResourceImpl service = (ResourceImpl) serviceNode.getObject();
      Map<String, Object> serviceInfoMap = service.getPropertiesMap().get("ServiceInfo");

      //service_settings population
      Map<String, String> serviceSetting = new HashMap<>();
      String serviceName = serviceInfoMap.get("service_name").toString();
      ServiceInfo serviceInfo = stack.getServiceInfo(serviceName).orElseThrow(IllegalStateException::new);
      boolean serviceDefaultCredentialStoreEnabled = serviceInfo.isCredentialStoreEnabled();
      String credentialStoreEnabledString = String.valueOf(serviceInfoMap.get(CREDENTIAL_STORE_ENABLED));
      boolean credentialStoreEnabled = Boolean.parseBoolean(credentialStoreEnabledString);
      if (credentialStoreEnabled != serviceDefaultCredentialStoreEnabled) {
        serviceSetting.put(CREDENTIAL_STORE_ENABLED, credentialStoreEnabledString);
        serviceSetting.put("name", serviceName);
        serviceSettings.add(serviceSetting);
      }

      //Fetch the service Components to obtain ServiceComponentInfo
      Collection<TreeNode<Resource>> componentChildren = serviceNode.getChild("components").getChildren();
      for (TreeNode<Resource> componentNode : componentChildren) {
        ResourceImpl component = (ResourceImpl) componentNode.getObject();
        Map<String, Object> serviceComponentInfoMap = component.getPropertiesMap().get("ServiceComponentInfo");
        String componentName = serviceComponentInfoMap.get("component_name").toString();
        boolean componentDefaultRecoveryEnabled = serviceInfo.getComponentByName(componentName).isRecoveryEnabled();

        if (serviceComponentInfoMap.containsKey(RECOVERY_ENABLED)) {
          String recoveryEnabledString = String.valueOf(serviceComponentInfoMap.get(RECOVERY_ENABLED));
          boolean recoveryEnabled = Boolean.parseBoolean(recoveryEnabledString);
          if (recoveryEnabled != componentDefaultRecoveryEnabled) {
            componentSettings.add(ImmutableMap.of(
              "name", componentName,
              RECOVERY_ENABLED, recoveryEnabledString
            ));
          }
        }
      }
    }

    if (exportType.include(serviceSettings)) {
      blueprintSetting.add(ImmutableMap.of(SERVICE_SETTINGS, serviceSettings));
    }
    if (exportType.include(componentSettings)) {
      blueprintSetting.add(ImmutableMap.of(COMPONENT_SETTINGS, componentSettings));
    }

    return blueprintSetting;
  }
Constructs the Settings object of the following form:
"settings": [   {
   "recovery_settings": [
   {
   "recovery_enabled": "true"
   }   ]   },
   {
   "service_settings": [   {
   "name": "HDFS",
   "recovery_enabled": "true",
   "credential_store_enabled": "true"
   },
   {
   "name": "TEZ",
   "recovery_enabled": "false"
   },
   {
   "name": "HIVE",
   "recovery_enabled": "false"
   }   ]   },
   {
   "component_settings": [   {
   "name": "DATANODE",
   "recovery_enabled": "true"
   }   ]   }   ]

@return A Collection<Map<String, Object>> which represents the Setting Object
ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java