public boolean isStaleConfigs(ServiceComponentHost sch, Map<String, DesiredConfig> requestDesiredConfigs)
      throws AmbariException {
    HostComponentDesiredStateEntity hostComponentDesiredStateEntity = sch.getDesiredStateEntity();
    return isStaleConfigs(sch, requestDesiredConfigs, hostComponentDesiredStateEntity);
  }
The purpose of this method is to determine if a
{@link ServiceComponentHost}'s known actual configs are different than what
is set on the cluster (the desired). The following logic is applied:
<ul>
<li>Desired type does not exist on the SCH (actual)
<ul>
<li>Type does not exist on the stack: <code>false</code></li>
<li>Type exists on the stack: <code>true</code> if the config key is on the
stack. otherwise <code>false</code></li>
</ul>
</li>
<li>Desired type exists for the SCH
<ul>
<li>Desired tags already set for the SCH (actual): <code>false</code></li>
<li>Desired tags DO NOT match SCH: <code>true</code> if the changed keys
exist on the stack, otherwise <code>false</code></li>
</ul>
</li>
</ul>

@param sch
         the SCH to calcualte config staleness for (not {@code null}).
@param requestDesiredConfigs
         the desired configurations for the cluster. Obtaining these can be
         expensive and since this method operates on SCH's, it could be
         called 10,000's of times when generating cluster/host responses.
         Therefore, the caller should build these once and pass them in. If
         {@code null}, then this method will retrieve them at runtime,
         incurring a performance penality.

@return <code>true</code> if the actual configs are stale
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java