Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-1134

Use new resource format in web app

    XMLWordPrintableJSON

Details

    Description

      In YUNIKORN-165 the resource format for the REST API is changed. That change requires an update in the web application.

      Resources are returned as properly structured objects in the json response for the REST API. The map of resources is returned as a json object with a zero or more key value combinations:

      • key type string
      • value type number

      A nil resource will be returned as an empty object.

      Example (from /ws/v1/partition/default/nodes):

      [
        {
          "nodeID": "yk8s-worker",
          "hostName": "",
          "rackName": "",
          "capacity": {
            "ephemeral-storage": 62725623808,
            "hugepages-1Gi": 0,
            "hugepages-2Mi": 0,
            "memory": 2081755136,
            "pods": 110,
            "vcore": 6000
          },
          "allocated": {
            "memory": 0,
            "vcore": 0
          },
          "occupied": {
            "memory": 577716800,
            "vcore": 200
          },
          "available": {
            "ephemeral-storage": 62725623808,
            "hugepages-1Gi": 0,
            "hugepages-2Mi": 0,
            "memory": 1504038336,
            "pods": 110,
            "vcore": 5800
          },
          "utilized": {
            "memory": 0,
            "vcore": 0
          },
          "allocations": [],
          "schedulable": true
        },
        ...
      ]
      

      Other resources will be updated similarly.

      Attachments

        Issue Links

          Activity

            People

              akhilpb Akhil PB
              wilfreds Wilfred Spiegelenburg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: