ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [2/2] ambari git commit: AMBARI-20994. Integrate RootServiceService with Swagger, addendum (adoroszlai)
Date Wed, 17 May 2017 17:25:16 GMT
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/ambari-rest-api-explorer
Commit: 9763993c75e4b50aeb82da24657c082f8bc01922
Parents: 950298b
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Wed May 17 16:13:18 2017 +0200
Committer: Attila Doroszlai <adoroszlai@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()));
       }
     }
     


Mime
View raw message