public void checkStaleConfigsStatusOnConfigsUpdate(Long clusterId, String serviceName,
                                                     Map<Long, Map<String, Collection<String>>> changedConfigs) throws AmbariException {
    if (MapUtils.isEmpty(changedConfigs)) {
      return;
    }

    if (!clusters.getCluster(clusterId).getServices().keySet().contains(serviceName)) {
      return;
    }
    Service service = clusters.getCluster(clusterId).getService(serviceName);
    for (ServiceComponent serviceComponent : service.getServiceComponents().values()) {
      String serviceComponentHostName = serviceComponent.getName();
      for (ServiceComponentHost serviceComponentHost : serviceComponent.getServiceComponentHosts().values()) {
        if (changedConfigs.keySet().contains(serviceComponentHost.getHost().getHostId())) {
          boolean staleConfigs = checkStaleConfigsStatusForHostComponent(serviceComponentHost,
              changedConfigs.get(serviceComponentHost.getHost().getHostId()));

          if (wasStaleConfigsStatusUpdated(clusterId, serviceComponentHost.getHost().getHostId(),
              serviceName, serviceComponentHostName, staleConfigs)) {
            serviceComponentHost.setRestartRequiredWithoutEventPublishing(staleConfigs);
            STOMPUpdatePublisher.publish(new HostComponentsUpdateEvent(Collections.singletonList(
                HostComponentUpdate.createHostComponentStaleConfigsStatusUpdate(clusterId,
                    serviceName, serviceComponentHost.getHostName(),
                    serviceComponentHostName, staleConfigs))));
          }
        }
      }
    }
  }
Checks configs are stale after specified config changes for service's components.
@param clusterId cluster with changed config
@param serviceName service for changed config
@param changedConfigs map of config types to collections of changed properties' names.
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java