ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swapan Shridhar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-21594) MultiEverything : Add Servicegroup as a subresource of Cluster.
Date Fri, 28 Jul 2017 03:29:00 GMT

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

Swapan Shridhar updated AMBARI-21594:
-------------------------------------
    Description: 
*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:

====
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}


===
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}


DELETE:

API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE

*Body:*
{code}
[]
{code}

*Response:* 200 OK

{code}
[]
{code}

  was:
*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:

====
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}


===
GET :
===

API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/

{code}
Body:
[]
{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

{code}
Body:
[]
{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}


DELETE:

API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE

{code}
Body:
[]
{code}

Response: 200 OK

{code}
[]
{code}


> MultiEverything : Add Servicegroup as a subresource of Cluster.
> ---------------------------------------------------------------
>
>                 Key: AMBARI-21594
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21594
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>             Fix For: 3.0.0
>
>
> *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:
> ====
> 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}
> ===
> 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}
> DELETE:
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> *Body:*
> {code}
> []
> {code}
> *Response:* 200 OK
> {code}
> []
> {code}



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

Mime
View raw message