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

inconsistent value type of the "type" field for LeafQueueInfo in response of RM REST API - cluster/scheduler

    XMLWordPrintableJSON

Details

    • Reviewed
    • Fix inconsistent value type ( String and Array ) of the "type" field for LeafQueueInfo in response of RM REST API
    • Important

    Description

      I see inconsistent value type ( String and Array ) of the "type" field for LeafQueueInfo in response of RM REST API - cluster/scheduler
      as per the spec it should be always String.

      here is the sample output ( removed non-relevant fields )

      {
        "scheduler": {
          "schedulerInfo": {
            "type": "capacityScheduler",
            "capacity": 100,
            ...
            "queueName": "root",
            "queues": {
              "queue": [
                {
                  "type": "capacitySchedulerLeafQueueInfo",
                  "capacity": 0.1,
                  ....
                },
                {
                  "type": [
                    "capacitySchedulerLeafQueueInfo"
                  ],
                  "capacity": 0.1,
                  "queueName": "test-queue",
                  "state": "RUNNING",
                  ....
                },
                {
                  "type": [
                    "capacitySchedulerLeafQueueInfo"
                  ],
                  "capacity": 2.5,
                  ....
                },
                {
                  "capacity": 25,
                  ....
                  "state": "RUNNING",
                  "queues": {
                    "queue": [
                      {
                        "capacity": 6,
                        "state": "RUNNING",
                        "queues": {
                          "queue": [
                            {
                              "type": "capacitySchedulerLeafQueueInfo",
                              "capacity": 100,
                              ...
                            }
                          ]
                        },
                        ....
                      },
                      {
                        "capacity": 6,
                        ...
                        "state": "RUNNING",
                        "queues": {
                          "queue": [
                            {
                              "type": "capacitySchedulerLeafQueueInfo",
                              "capacity": 100,
                              ...
                            }
                          ]
                        },
                        ...
                      },
                      ...
                    ]
                  },
                  ...
                }
              ]
            }
          }
        }
      }
      

      Attachments

        1. YARN-4785.001.patch
          4 kB
          Varun Vasudev
        2. YARN-4785.branch-2.6.001.patch
          4 kB
          Varun Vasudev
        3. YARN-4785.branch-2.7.001.patch
          4 kB
          Varun Vasudev

        Activity

          People

            vvasudev Varun Vasudev
            jhsenjaliya Jay Sen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: