Browse Source

AMBARI-9703. Cannot apply new property set for slider-client through api (aonishuk)

Andrew Onishuk 10 years ago
parent
commit
205666cfe1

+ 3 - 8
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java

@@ -301,14 +301,9 @@ public class ClusterImpl implements Cluster {
     for (Entry<String, ServiceInfo> entry : serviceInfoMap.entrySet()) {
       String serviceName = entry.getKey();
       ServiceInfo serviceInfo = entry.getValue();
-      //collect config types for service
-      Set<PropertyInfo> properties = ambariMetaInfo.getServiceProperties(desiredStackVersion.getStackName(),
-          desiredStackVersion.getStackVersion(), serviceName);
-      for (PropertyInfo property : properties) {
-        String configType = ConfigHelper.fileNameToConfigType(property.getFilename());
-        if (serviceInfo.hasConfigType(configType)) {
-          serviceConfigTypes.put(serviceName, configType);
-        }
+      Set<String> configTypes = serviceInfo.getConfigTypeAttributes().keySet();
+      for (String configType : configTypes) {
+        serviceConfigTypes.put(serviceName, configType);
       }
     }