You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ad...@apache.org on 2020/09/07 08:29:50 UTC

[hadoop] branch trunk updated: YARN-9136. getNMResourceInfo NodeManager REST API method is not documented

This is an automated email from the ASF dual-hosted git repository.

adamantal pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new dd6c665  YARN-9136. getNMResourceInfo NodeManager REST API method is not documented
dd6c665 is described below

commit dd6c66556e562d90765a6ff10bcf994df024b44d
Author: Adam Antal <ad...@cloudera.com>
AuthorDate: Mon Sep 7 10:29:20 2020 +0200

    YARN-9136. getNMResourceInfo NodeManager REST API method is not documented
---
 .../src/site/markdown/NodeManagerRest.md           | 106 +++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/NodeManagerRest.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/NodeManagerRest.md
index 88e6f7f..b088c48 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/NodeManagerRest.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/NodeManagerRest.md
@@ -681,3 +681,109 @@ Response Body:
   </service>
 </services>
 ```
+
+Resources API
+-------------
+
+With Resources API, you can list the GPU resources present on the NodeManager.
+
+### URI
+
+Use the following URI to obtain resources on the NodeManager
+
+      * http://nm-http-address:port/ws/v1/node/resources/{resourcename}
+
+### HTTP Operations Supported
+
+      * GET
+
+### Query Parameters Supported
+
+      None
+
+### Elements of the *NMGpuResourceInfo* object
+
+The response to this request if any GPU device is present on the NodeManager.
+
+| Properties | Data Type | Description |
+|:---- |:---- |:---- |
+| gpuDeviceInformation | GpuDeviceInformation | Contains all GPU Device Information in the system |
+| totalGpuDevices | List of GpuDevice objects | Contains the representations of GPU devices |
+| assignedGpuDevices | List of AssignedGpuDevice objects | In addition to GpuDevice, AssignedGpuDevice includes container ID |
+
+### Elements of the *GpuDeviceInformation* object
+
+| Properties | Data Type | Description |
+|:---- |:---- |:---- |
+| gpus | List of PerGpuDeviceInformation objects | Information objects about specific GPU devices |
+| driverVersion | String | ... |
+
+### Elements of the *PerGpuDeviceInformation* object
+
+| Properties | Data Type | Description |
+|:---- |:---- |:---- |
+| productName | String | Name of the GPU device |
+| uuid | String | Universally unique identifier of the GPU device |
+| minorNumber | int | Secondary identifier of the GPU device |
+
+### Elements of the *GpuDevice* object
+
+| Properties | Data Type | Description |
+|:---- |:---- |:---- |
+| index | int | Main identifier of the GPU device |
+| minorNumber | int | Secondary identifier of the GPU device |
+
+### Elements of the *AssignedGpuDevice* object
+
+| Properties | Data Type | Description |
+|:---- |:---- |:---- |
+| index | int | Main identifier of the GPU device |
+| minorNumber | int | Secondary identifier of the GPU device |
+| containerId | String | Identifier of the container |
+
+### GET Response Examples
+
+**JSON response**
+
+HTTP Request:
+
+      GET http://nm-http-address:port/ws/v1/node/resources/yarn.io%2Fgpu
+
+Response Header:
+
+      Cache-Control: no-cache
+      Pragma: no-cache
+      X-Content-Type-Options: nosniff
+      X-XSS-Protection: 1; mode=block
+      X-Frame-Options: SAMEORIGIN
+      Content-Type: application/json;charset=utf-8
+      Vary: Accept-Encoding
+      Content-Encoding: gzip
+      Transfer-Encoding: chunked
+
+Response Body:
+
+```json
+{
+    "gpuDeviceInformation": null,
+    "totalGpuDevices": [
+        {
+            "index": 0,
+            "minorNumber": 0
+        },
+        {
+            "index": 1,
+            "minorNumber": 1
+        },
+        {
+            "index": 2,
+            "minorNumber": 2
+        },
+        {
+            "index": 3,
+            "minorNumber": 4
+        }
+    ],
+    "assignedGpuDevices": []
+}
+```


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org