Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8542

Yarn Service: Add component name to container json

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • None
    • None

    Description

      GET app/v1/services/service-name/component-instances returns a list of containers with YARN-8299.

      [
      {
      "id": "container_1531508836237_0001_01_000003",
      "ip": "192.168.2.51",
      "hostname": "HW12119.local",
      "state": "READY",
      "launch_time": 1531509014497,
      "bare_host": "192.168.2.51",
      "component_instance_name": "sleeper-1"
      },
      {
      "id": "container_1531508836237_0001_01_000002",
      "ip": "192.168.2.51",
      "hostname": "HW12119.local",
      "state": "READY",
      "launch_time": 1531509013492,
      "bare_host": "192.168.2.51",
      "component_instance_name": "sleeper-0"
      }
      ]

      component_name is not part of container json, so it is hard to tell which component an instance belongs to.
      To fix this, will change the format of returned containers to:

      [
        {
          "name": "ping",
          "containers": [
            {
              "bare_host": "eyang-4.openstacklocal",
              "component_instance_name": "ping-0",
              "hostname": "ping-0.qqq.hbase.ycluster",
              "id": "container_1531765479645_0002_01_000002",
              "ip": "172.26.111.21",
              "launch_time": 1531767377301,
              "state": "READY"
            },
            {
              "bare_host": "eyang-4.openstacklocal",
              "component_instance_name": "ping-1",
              "hostname": "ping-1.qqq.hbase.ycluster",
              "id": "container_1531765479645_0002_01_000007",
              "ip": "172.26.111.21",
              "launch_time": 1531767410395,
              "state": "RUNNING_BUT_UNREADY"
            }
          ]
        },
        {
          "name": "sleep",
          "containers": [
            {
              "bare_host": "eyang-5.openstacklocal",
              "component_instance_name": "sleep-0",
              "hostname": "sleep-0.qqq.hbase.ycluster",
              "id": "container_1531765479645_0002_01_000004",
              "ip": "172.26.111.20",
              "launch_time": 1531767377710,
              "state": "READY"
            },
            {
              "bare_host": "eyang-4.openstacklocal",
              "component_instance_name": "sleep-1",
              "hostname": "sleep-1.qqq.hbase.ycluster",
              "id": "container_1531765479645_0002_01_000005",
              "ip": "172.26.111.21",
              "launch_time": 1531767378303,
              "state": "READY"
            }
          ]
        }
      ]

       

      Attachments

        1. YARN-8542.002.patch
          25 kB
          Chandni Singh
        2. YARN-8542.001.patch
          23 kB
          Chandni Singh

        Issue Links

          Activity

            People

              csingh Chandni Singh
              csingh Chandni Singh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: