From 1e143029233df1e454857919900960ee85f8a4f6 Mon Sep 17 00:00:00 2001 From: saurabh jain Date: Thu, 11 Sep 2014 22:07:56 +0530 Subject: [PATCH] Added detailed response for 'view cluster information' under Server API documentation --- ambari-server/docs/api/v1/clusters-cluster.md | 280 ++++++++++++------ 1 file changed, 186 insertions(+), 94 deletions(-) diff --git a/ambari-server/docs/api/v1/clusters-cluster.md b/ambari-server/docs/api/v1/clusters-cluster.md index 0a57e4362e4..12bdb00e84f 100644 --- a/ambari-server/docs/api/v1/clusters-cluster.md +++ b/ambari-server/docs/api/v1/clusters-cluster.md @@ -66,99 +66,191 @@ Get information for the cluster "c1". 200 OK { - "href" : "http://your.ambari.server/api/v1/clusters/c1", - "Clusters" : { - "cluster_name" : "c1", - "cluster_id" : 1, - "version" : "HDP-1.2.0" - }, - "services" : [ - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/NAGIOS", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "NAGIOS" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HCATALOG", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "HCATALOG" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/PIG", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "PIG" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/MAPREDUCE", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "MAPREDUCE" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/GANGLIA", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "GANGLIA" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HIVE", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "HIVE" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HDFS", - "ServiceInfo" : { - "cluster_name" : "MyIE9", - "service_name" : "HDFS" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/ZOOKEEPER", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "ZOOKEEPER" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HBASE", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "HBASE" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/services/OOZIE", - "ServiceInfo" : { - "cluster_name" : "c1", - "service_name" : "OOZIE" - } - } + "href" : "http://your.ambari.server/api/v1/clusters/cluster001", + "Clusters" : { + "cluster_id" : 9, + "cluster_name" : "cluster001", + "health_report" : { + "Host/stale_config" : 1, + "Host/maintenance_state" : 0, + "Host/host_state/HEALTHY" : 3, + "Host/host_state/UNHEALTHY" : 0, + "Host/host_state/HEARTBEAT_LOST" : 0, + "Host/host_state/INIT" : 0, + "Host/host_status/HEALTHY" : 3, + "Host/host_status/UNHEALTHY" : 0, + "Host/host_status/UNKNOWN" : 0, + "Host/host_status/ALERT" : 0 + }, + "provisioning_state" : "INIT", + "total_hosts" : 3, + "version" : "HDP-2.0", + "desired_configs" : { + "capacity-scheduler" : { + "user" : "admin", + "tag" : "version1408514705943" + }, + "core-site" : { + "user" : "admin", + "tag" : "version1409806913314" + }, + "global" : { + "user" : "admin", + "tag" : "version1409806913314" + }, + "hdfs-log4j" : { + "user" : "admin", + "tag" : "version1" + }, + "hdfs-site" : { + "user" : "admin", + "tag" : "version1407908591996" + }, + "mapred-site" : { + "user" : "admin", + "tag" : "version1408514705943" + }, + "mapreduce2-log4j" : { + "user" : "admin", + "tag" : "version1408514705943" + }, + "yarn-log4j" : { + "user" : "admin", + "tag" : "version1408514705943" + }, + "yarn-site" : { + "user" : "admin", + "tag" : "version1408514705943" + }, + "zoo.cfg" : { + "user" : "admin", + "tag" : "version1" + }, + "zookeeper-log4j" : { + "user" : "admin", + "tag" : "version1" + } + } + }, + "alerts" : { + "summary" : { + "CRITICAL" : 1, + "OK" : 2, + "PASSIVE" : 0, + "WARNING" : 0 + } + }, + "requests" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/requests/304", + "Requests" : { + "cluster_name" : "cluster001", + "id" : 304 + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/requests/305", + "Requests" : { + "cluster_name" : "cluster001", + "id" : 305 + } + } + ], + "services" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/services/GANGLIA", + "ServiceInfo" : { + "cluster_name" : "cluster001", + "service_name" : "GANGLIA" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/services/HDFS", + "ServiceInfo" : { + "cluster_name" : "cluster001", + "service_name" : "HDFS" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/services/MAPREDUCE2", + "ServiceInfo" : { + "cluster_name" : "cluster001", + "service_name" : "MAPREDUCE2" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/services/ZOOKEEPER", + "ServiceInfo" : { + "cluster_name" : "cluster001", + "service_name" : "ZOOKEEPER" + } + } ], - "hosts" : [ - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/hosts/some.host", - "Hosts" : { - "cluster_name" : "c1", - "host_name" : "some.host" - } - }, - { - "href" : "http://your.ambari.server/api/v1/clusters/c1/hosts/another.host", - "Hosts" : { - "cluster_name" : "c1", - "host_name" : "another.host" - } - } - ] + "config_groups" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/config_groups/2", + "ConfigGroup" : { + "cluster_name" : "cluster001", + "id" : 2 + } + } + ], + "workflows" : [ ], + "hosts" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/hosts/host1.domain.com", + "Hosts" : { + "cluster_name" : "cluster001", + "host_name" : "host1.domain.com" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/hosts/host2.domain.com", + "Hosts" : { + "cluster_name" : "cluster001", + "host_name" : "host2.domain.com" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/hosts/host3.domain.com", + "Hosts" : { + "cluster_name" : "cluster001", + "host_name" : "host3.domain.com" + } + } + ], + "configurations" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/configurations?type=core-site&tag=version1", + "tag" : "version1", + "type" : "core-site", + "Config" : { + "cluster_name" : "cluster001" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/configurations?type=global&tag=version1", + "tag" : "version1", + "type" : "global", + "Config" : { + "cluster_name" : "cluster001" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/configurations?type=hdfs-site&tag=version1", + "tag" : "version1", + "type" : "hdfs-site", + "Config" : { + "cluster_name" : "cluster001" + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/cluster001/configurations?type=zoo.cfg&tag=version1", + "tag" : "version1", + "type" : "zoo.cfg", + "Config" : { + "cluster_name" : "cluster001" + } + }, + ] } -