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/17 17:25:15 UTC

[1/2] ambari git commit: AMBARI-20951. Integrate HostService with Swagger, addendum (adoroszlai)

Repository: ambari
Updated Branches:
  refs/heads/ambari-rest-api-explorer 275525b21 -> 9763993c7


AMBARI-20951. Integrate HostService 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/950298bc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/950298bc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/950298bc

Branch: refs/heads/ambari-rest-api-explorer
Commit: 950298bcd67114c6b4f0f81e2b6aea2155b358e8
Parents: 275525b
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed May 17 15:14:59 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 17 15:14:59 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/ambari/server/state/host/HostImpl.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/950298bc/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
index 4624ea8..c774fc1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
@@ -938,6 +938,7 @@ public class HostImpl implements Host {
   public HostResponse convertToResponse() {
     HostResponse r = new HostResponse(getHostName());
 
+    r.setAgentVersion(getAgentVersion());
     r.setPhCpuCount(getPhCpuCount());
     r.setCpuCount(getCpuCount());
     r.setDisksInfo(getDisksInfo());


[2/2] ambari git commit: AMBARI-20994. Integrate RootServiceService with Swagger, addendum (adoroszlai)

Posted by ad...@apache.org.
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 <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()));
       }
     }