You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2018/07/18 21:20:00 UTC

[ambari] branch trunk updated: AMBARI-24273. hadoop-env is not regenerated when OneFS is used as a FileSystem (amagyar) (#1773)

This is an automated email from the ASF dual-hosted git repository.

amagyar 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 e6061fd  AMBARI-24273. hadoop-env is not regenerated when OneFS is used as a FileSystem (amagyar) (#1773)
e6061fd is described below

commit e6061fd4bc3ca87cd09cfad08b1233afd9779982
Author: Attila Magyar <m....@gmail.com>
AuthorDate: Wed Jul 18 23:19:57 2018 +0200

    AMBARI-24273. hadoop-env is not regenerated when OneFS is used as a FileSystem (amagyar) (#1773)
---
 .../server/controller/AmbariManagementControllerImpl.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 2f4ae73..8e7196f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -5771,13 +5771,13 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
         PropertyType.NOT_MANAGED_HDFS_PATH, cluster, desiredConfigs);
     String notManagedHdfsPathList = gson.toJson(notManagedHdfsPathSet);
     clusterLevelParams.put(NOT_MANAGED_HDFS_PATH_LIST, notManagedHdfsPathList);
-
-    Map<String, ServiceInfo> serviceInfos = ambariMetaInfo.getServices(stackId.getStackName(), stackId.getStackVersion());
-    for (ServiceInfo serviceInfoInstance : serviceInfos.values()) {
-      if (serviceInfoInstance.getServiceType() != null) {
+    
+    for (Service service : cluster.getServices().values()) {
+      ServiceInfo serviceInfoInstance = ambariMetaInfo.getService(service);
+      String serviceType = serviceInfoInstance.getServiceType();
+      if (serviceType != null) {
         LOG.debug("Adding {} to command parameters for {}", serviceInfoInstance.getServiceType(),
-            serviceInfoInstance.getName());
-
+          serviceInfoInstance.getName());
         clusterLevelParams.put(DFS_TYPE, serviceInfoInstance.getServiceType());
         break;
       }