You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Swapan Shridhar (JIRA)" <ji...@apache.org> on 2017/08/02 08:27:00 UTC

[jira] [Updated] (AMBARI-21594) MultiEverything : Add Servicegroup as a subresource of Cluster.

     [ https://issues.apache.org/jira/browse/AMBARI-21594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapan Shridhar updated AMBARI-21594:
-------------------------------------
    Attachment: ServiceSGWork.4.patch

> MultiEverything : Add Servicegroup as a subresource of Cluster.
> ---------------------------------------------------------------
>
>                 Key: AMBARI-21594
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21594
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>             Fix For: 3.0.0
>
>         Attachments: AMBARI-21594.1.patch, AMBARI-21594.2.patch, AMBARI-21594.3.patch, AMBARI-21594.patch, ServiceSGWork.4.patch
>
>
> *ServiceGroup (SG)* : is defined as sub-resource of cluster. It would later be used to logically group a set of services (coming out of Management Pack selected).
>  
> *Example of a Service groups can be a:* 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> As part of this JIRA, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> --------------------------------------------------------------------------------------------------------------------------------------
> *API calls and response:*
> *1.* 
> ====
> POST:
> ====
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> {code}
> [
> {
>   "ServiceGroupInfo" : {
>     "cluster_id": "2",
>     "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
>     "cluster_id": "2",
>     "service_group_name": "EDW"
>   }
> }
> ]
> {code}
> *Response:* 201 CREATED
> {code}
> {
>   "resources" : [
>     {
>       "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE",
>       "ServiceGroupInfo" : {
>         "cluster_id" : 2,
>         "cluster_name" : "c1",
>         "service_group_id" : 804,
>         "service_group_name" : "CORE"
>       }
>     },
>     {
>       "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW",
>       "ServiceGroupInfo" : {
>         "cluster_id" : 2,
>         "cluster_name" : "c1",
>         "service_group_id" : 803,
>         "service_group_name" : "EDW"
>       }
>     }
>   ]
> }
> {code}
> *2.*
> ===
> GET :
> ===
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> *Body:*
> {code}
> []
> {code}
> *Response:* 200 OK
> {code}
> {
>   "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/",
>   "items" : [
>     {
>       "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE",
>       "ServiceGroupInfo" : {
>         "cluster_name" : "c1",
>         "service_group_name" : "CORE"
>       }
>     },
>     {
>       "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW",
>       "ServiceGroupInfo" : {
>         "cluster_name" : "c1",
>         "service_group_name" : "EDW"
>       }
>     }
>   ]
> }
> {code}
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> *Body:*
> {code}
> []
> {code}
> *Response:* 200 OK
> {code}
> {
>   "href" : "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE",
>   "ServiceGroupInfo" : {
>     "cluster_id" : 2,
>     "cluster_name" : "c1",
>     "service_group_id" : 804,
>     "service_group_name" : "CORE"
>   }
> }
> {code}
> *3.*
> =======
> DELETE:
> =======
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> *Body:*
> {code}
> []
> {code}
> *Response:* 200 OK
> {code}
> {
>   "deleteResult" : [
>     {
>       "deleted" : {
>         "key" : "[clusterName=c1, serviceGroupName=CORE]"
>       }
>     }
>   ]
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)