You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2017/05/23 10:34:40 UTC
[42/49] ambari git commit: AMBARI-20994. Integrate RootServiceService
with Swagger, addendum (adoroszlai)
AMBARI-20994. Integrate RootServiceService with Swagger, addendum (adoroszlai)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9763993c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9763993c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9763993c
Branch: refs/heads/trunk
Commit: 9763993c75e4b50aeb82da24657c082f8bc01922
Parents: 950298b
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed May 17 16:13:18 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 17 19:27:16 2017 +0200
----------------------------------------------------------------------
.../ambari/server/controller/RootServiceResponseFactory.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9763993c/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
index 714fbed..294bcc9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
@@ -199,9 +199,8 @@ public class RootServiceResponseFactory extends
Set<RootServiceHostComponentResponse> response = new HashSet<>();
String serviceName = request.getServiceName();
- String componentName = request.getComponentName();
Set<RootServiceComponentResponse> rootServiceComponents =
- getRootServiceComponents(new RootServiceComponentRequest(serviceName, componentName));
+ getRootServiceComponents(new RootServiceComponentRequest(serviceName, request.getComponentName()));
//Cartesian product with hosts and components
for (RootServiceComponentResponse component : rootServiceComponents) {
@@ -226,8 +225,8 @@ public class RootServiceResponseFactory extends
} else {
state = host.getHostState().toString();
}
- String componentVersion = getComponentVersion(componentName, host);
- response.add(new RootServiceHostComponentResponse(serviceName, host.getHostname(), componentName, state, componentVersion, component.getProperties()));
+ String componentVersion = getComponentVersion(component.getComponentName(), host);
+ response.add(new RootServiceHostComponentResponse(serviceName, host.getHostname(), component.getComponentName(), state, componentVersion, component.getProperties()));
}
}