This is an automated email from the ASF dual-hosted git repository. aonishuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 18eefee AMBARI-24559. Diff in Downloaded client config: Host file has Stack info where as downloaded file has 'None' in "user.agent.prefix" properties (aonishuk) 18eefee is described below commit 18eefee38e7731176937d255ad4130221b19a0dc Author: Andrew Onishuk <aonis...@hortonworks.com> AuthorDate: Wed Oct 24 11:29:14 2018 +0300 AMBARI-24559. Diff in Downloaded client config: Host file has Stack info where as downloaded file has 'None' in "user.agent.prefix" properties (aonishuk) --- .../server/controller/internal/ClientConfigResourceProvider.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java index 01e8f37..3940c83 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java @@ -76,6 +76,7 @@ import org.apache.ambari.server.state.DesiredConfig; import org.apache.ambari.server.state.PropertyInfo.PropertyType; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.ServiceComponent; +import org.apache.ambari.server.state.ServiceComponentHost; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.ServiceOsSpecific; import org.apache.ambari.server.state.StackId; @@ -400,10 +401,17 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv TreeMap<String, String> clusterLevelParams = null; TreeMap<String, String> ambariLevelParams = null; + TreeMap<String, String> topologyCommandParams = new TreeMap<>(); if (getManagementController() instanceof AmbariManagementControllerImpl){ AmbariManagementControllerImpl controller = ((AmbariManagementControllerImpl)getManagementController()); clusterLevelParams = controller.getMetadataClusterLevelParams(cluster, stackId); ambariLevelParams = controller.getMetadataAmbariLevelParams(); + + Service s = cluster.getService(serviceName); + ServiceComponent sc = s.getServiceComponent(componentName); + ServiceComponentHost sch = sc.getServiceComponentHost(response.getHostname()); + + topologyCommandParams = controller.getTopologyCommandParams(cluster.getClusterId(), serviceName, componentName, sch); } TreeMap<String, String> agentLevelParams = new TreeMap<>(); agentLevelParams.put("hostname", hostName); @@ -414,6 +422,7 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv commandParams.put("env_configs_list", envConfigs); commandParams.put("properties_configs_list", propertiesConfigs); commandParams.put("output_file", componentName + "-configs" + Configuration.DEF_ARCHIVE_EXTENSION); + commandParams.putAll(topologyCommandParams); Map<String, Object> jsonContent = new TreeMap<>(); jsonContent.put("configurations", configurations);