Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21594

MultiEverything : Add Servicegroup as a subresource of Cluster.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • ambari-server
    • None

    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:

      1.
      ====
      POST:
      ====

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

      [
      {
        "ServiceGroupInfo" : {
          "cluster_id": "2",
          "service_group_name": "CORE"
        }
      },
      {
        "ServiceGroupInfo" : {
          "cluster_id": "2",
          "service_group_name": "EDW"
        }
      }
      ]
      

      Response: 201 CREATED

      {
        "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"
            }
          }
        ]
      }
      

      2.
      ===
      GET :
      ===

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

      Body:

      []
      

      Response: 200 OK

      {
        "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"
            }
          }
        ]
      }
      

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

      Body:

      []
      

      Response: 200 OK

      {
        "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"
        }
      }
      

      3.
      =======
      DELETE:
      =======

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

      Body:

      []
      

      Response: 200 OK

      {
        "deleteResult" : [
          {
            "deleted" : {
              "key" : "cluster_name: c1, service_group_name: CORE"
            }
          }
        ]
      }
      

      Attachments

        1. AMBARI-21594.1.patch
          175 kB
          Swapan Shridhar
        2. AMBARI-21594.2.patch
          183 kB
          Swapan Shridhar
        3. AMBARI-21594.3.patch
          183 kB
          Swapan Shridhar
        4. AMBARI-21594.4.patch
          183 kB
          Swapan Shridhar
        5. AMBARI-21594.patch
          175 kB
          Swapan Shridhar

        Issue Links

          Activity

            People

              swapanshridhar Swapan Shridhar
              swapanshridhar Swapan Shridhar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: