AMBARI-19755. Test Fix. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01f4a69e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01f4a69e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01f4a69e Branch: refs/heads/branch-dev-patch-upgrade Commit: 01f4a69e2ecc266d839713a53e428350cddcbc69 Parents: cc42c95 Author: Vitaly Brodetskyi <[email protected]> Authored: Wed Feb 1 01:39:36 2017 +0200 Committer: Vitaly Brodetskyi <[email protected]> Committed: Wed Feb 1 01:39:36 2017 +0200 ---------------------------------------------------------------------- .../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/01f4a69e/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 e124576..2a66795 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
