AMBARI-19755. Test Fix. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)
(cherry picked from commit 8ef727841c94fdc4a1e5b4a75e32f01fa9141527) Change-Id: I0af6f3b2a4adbb2e1264e6c8a399dd1c36a513d5 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d56e520a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d56e520a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d56e520a Branch: refs/heads/branch-feature-BUG-74026 Commit: d56e520ae6e7557e49efb7b95eb9b230f1ad23c1 Parents: e3b9ef3 Author: Vitaly Brodetskyi <vbrodets...@hortonworks.com> Authored: Wed Feb 1 01:37:18 2017 +0200 Committer: Zuul <rel...@hortonworks.com> Committed: Tue Feb 7 06:29:37 2017 -0800 ---------------------------------------------------------------------- .../org/apache/ambari/server/state/cluster/ClusterImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d56e520a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java index 5da8012..a4c4b36 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java @@ -2894,13 +2894,13 @@ public class ClusterImpl implements Cluster { Service service = clusterServices.get(serviceName); Map<String, ServiceComponent> components = service.getServiceComponents(); - Map<String, ServiceComponentHost> serviceComponentHosts = components.get(componentName).getServiceComponentHosts(); - if (!components.containsKey(componentName) || serviceComponentHosts.size() == 0) { + if (!components.containsKey(componentName) || + components.get(componentName).getServiceComponentHosts().size() == 0) { return Collections.emptySet(); } - return serviceComponentHosts.keySet(); + return components.get(componentName).getServiceComponentHosts().keySet(); } @Override