|
@@ -2326,6 +2326,291 @@ Response Body:
|
|
|
</appAttempts>
|
|
|
```
|
|
|
|
|
|
+Containers for an Application Attempt API
|
|
|
+-----------------------------------------
|
|
|
+
|
|
|
+With Containers for an Application Attempt API you can obtain the list of containers, which belongs to an Application Attempt.
|
|
|
+
|
|
|
+### URI
|
|
|
+
|
|
|
+ * http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers
|
|
|
+
|
|
|
+### HTTP Operations Supported
|
|
|
+
|
|
|
+ * GET
|
|
|
+
|
|
|
+### Query Parameters Supported
|
|
|
+
|
|
|
+ None
|
|
|
+
|
|
|
+### Elements of the *containers* object
|
|
|
+
|
|
|
+When you make a request for the list of containers, the information will be returned as an array of container objects.
|
|
|
+
|
|
|
+containers:
|
|
|
+
|
|
|
+| Item | Data Type | Description |
|
|
|
+|:---- |:---- |:---- |
|
|
|
+| containers | array of app container objects(JSON)/zero or more container objects(XML) | The collection of app container objects |
|
|
|
+
|
|
|
+### Elements of the *container* object
|
|
|
+
|
|
|
+| Item | Data Type | Description |
|
|
|
+|:---- |:---- |:---- |
|
|
|
+| containerId | string | The container id |
|
|
|
+| allocatedMB | long | The amount of memory allocated for the container in MB |
|
|
|
+| allocatedVCores | int | The amount of virtual cores allocated for the container |
|
|
|
+| assignedNodeId | string | The node id of the node the attempt ran on |
|
|
|
+| priority | int | Allocated priority of the container |
|
|
|
+| startedTime | long | The start time of the attempt (in ms since epoch) |
|
|
|
+| finishedTime | long | The finish time of the attempt (in ms since epoch) 0 if not finished |
|
|
|
+| elapsedTime | long | The elapsed time in ms since the startedTime |
|
|
|
+| logUrl | string | The web URL that can be used to check the log for the container |
|
|
|
+| containerExitStatus | int | Final exit status of the container |
|
|
|
+| containerState | string | State of the container, can be NEW, RUNNING, or COMPLETE |
|
|
|
+| nodeHttpAddress | string | The node http address of the node the attempt ran on ||
|
|
|
+| nodeId | string | The node id of the node the attempt ran on |
|
|
|
+| allocatedResources |array of resource(JSON)/zero or more resource objects(XML) | Allocated resources for the container |
|
|
|
+
|
|
|
+### Elements of the *resource* object
|
|
|
+| Item | Data Type | Description |
|
|
|
+|:---- |:---- |:---- |
|
|
|
+| memory | int | The maximum memory for the container |
|
|
|
+| vCores | int | The maximum number of vcores for the container |
|
|
|
+
|
|
|
+**JSON response**
|
|
|
+
|
|
|
+HTTP Request:
|
|
|
+
|
|
|
+ GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers
|
|
|
+
|
|
|
+Response Header:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Type: application/json
|
|
|
+ Transfer-Encoding: chunked
|
|
|
+ Server: Jetty(6.1.26)
|
|
|
+
|
|
|
+Response Body:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "containers" : {
|
|
|
+ "container": [
|
|
|
+ {
|
|
|
+ "containerId": "container_1531404209605_0008_01_000001",
|
|
|
+ "allocatedMB": "1536",
|
|
|
+ "allocatedVCores": "1",
|
|
|
+ "assignedNodeId": "host.domain.com:37814",
|
|
|
+ "priority": "0",
|
|
|
+ "startedTime": "1531405909444",
|
|
|
+ "finishedTime": "0",
|
|
|
+ "elapsedTime": "4112",
|
|
|
+ "logUrl": "http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest",
|
|
|
+ "containerExitStatus": "0",
|
|
|
+ "containerState": "RUNNING",
|
|
|
+ "nodeHttpAddress": "http://host.domain.com:8042",
|
|
|
+ "nodeId": "host.domain.com:37814",
|
|
|
+ "allocatedResources": [
|
|
|
+ {
|
|
|
+ "key": "memory-mb",
|
|
|
+ "value": "1536"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "key": "vcores",
|
|
|
+ "value": "1"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+**XML response**
|
|
|
+
|
|
|
+HTTP Request:
|
|
|
+
|
|
|
+ GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers
|
|
|
+ Accept: application/xml
|
|
|
+
|
|
|
+Response Header:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Type: application/xml
|
|
|
+ Content-Length: 1104
|
|
|
+ Server: Jetty(6.1.26)
|
|
|
+
|
|
|
+Response Body:
|
|
|
+
|
|
|
+```xml
|
|
|
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
+<containers>
|
|
|
+ <container>
|
|
|
+ <containerId>container_1531404209605_0008_01_000001</containerId>
|
|
|
+ <allocatedMB>1536</allocatedMB>
|
|
|
+ <allocatedVCores>1</allocatedVCores>
|
|
|
+ <assignedNodeId>host.domain.com:37814</assignedNodeId>
|
|
|
+ <priority>0</priority>
|
|
|
+ <startedTime>1531405909444</startedTime>
|
|
|
+ <finishedTime>0</finishedTime>
|
|
|
+ <elapsedTime>4112</elapsedTime>
|
|
|
+ <logUrl>
|
|
|
+ http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest
|
|
|
+ </logUrl>
|
|
|
+ <containerExitStatus>0</containerExitStatus>
|
|
|
+ <containerState>RUNNING</containerState>
|
|
|
+ <nodeHttpAddress>http://host.domain.com:8042</nodeHttpAddress>
|
|
|
+ <nodeId>host.domain.com:37814</nodeId>
|
|
|
+ <allocatedResources>
|
|
|
+ <entry>
|
|
|
+ <key>memory-mb</key>
|
|
|
+ <value>1536</value>
|
|
|
+ </entry>
|
|
|
+ <entry>
|
|
|
+ <key>vcores</key>
|
|
|
+ <value>1</value>
|
|
|
+ </entry>
|
|
|
+ </allocatedResources>
|
|
|
+ </container>
|
|
|
+</containers>
|
|
|
+```
|
|
|
+
|
|
|
+Specific Container for an Application Attempt API
|
|
|
+-------------------------------------------------
|
|
|
+
|
|
|
+With Specific Container for an Application Attempt API you can obtain information about a specific container, which belongs to an Application Attempt and selected by the container id.
|
|
|
+
|
|
|
+### URI
|
|
|
+
|
|
|
+ * http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers/{containerId}
|
|
|
+
|
|
|
+### HTTP Operations Supported
|
|
|
+
|
|
|
+ * GET
|
|
|
+
|
|
|
+### Query Parameters Supported
|
|
|
+
|
|
|
+ None
|
|
|
+
|
|
|
+### Elements of the *container* object
|
|
|
+
|
|
|
+| Item | Data Type | Description |
|
|
|
+|:---- |:---- |:---- |
|
|
|
+| containerId | string | The container id |
|
|
|
+| allocatedMB | long | The amount of memory allocated for the container in MB |
|
|
|
+| allocatedVCores | int | The amount of virtual cores allocated for the container |
|
|
|
+| assignedNodeId | string | The node id of the node the attempt ran on |
|
|
|
+| priority | int | Allocated priority of the container |
|
|
|
+| startedTime | long | The start time of the attempt (in ms since epoch) |
|
|
|
+| finishedTime | long | The finish time of the attempt (in ms since epoch) 0 if not finished |
|
|
|
+| elapsedTime | long | The elapsed time in ms since the startedTime |
|
|
|
+| logUrl | string | The web URL that can be used to check the log for the container |
|
|
|
+| containerExitStatus | int | Final exit status of the container |
|
|
|
+| containerState | string | State of the container, can be NEW, RUNNING, or COMPLETE |
|
|
|
+| nodeHttpAddress | string | The node http address of the node the attempt ran on ||
|
|
|
+| nodeId | string | The node id of the node the attempt ran on |
|
|
|
+| allocatedResources |array of resource(JSON)/zero or more resource objects(XML) | Allocated resources for the container |
|
|
|
+
|
|
|
+### Elements of the *resource* object
|
|
|
+| Item | Data Type | Description |
|
|
|
+|:---- |:---- |:---- |
|
|
|
+| memory | int | The maximum memory for the container |
|
|
|
+| vCores | int | The maximum number of vcores for the container |
|
|
|
+
|
|
|
+**JSON response**
|
|
|
+
|
|
|
+HTTP Request:
|
|
|
+
|
|
|
+ GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers/{containerId}
|
|
|
+
|
|
|
+Response Header:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Type: application/json
|
|
|
+ Transfer-Encoding: chunked
|
|
|
+ Server: Jetty(6.1.26)
|
|
|
+
|
|
|
+Response Body:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "container": {
|
|
|
+ "containerId": "container_1531404209605_0008_01_000001",
|
|
|
+ "allocatedMB": "1536",
|
|
|
+ "allocatedVCores": "1",
|
|
|
+ "assignedNodeId": "host.domain.com:37814",
|
|
|
+ "priority": "0",
|
|
|
+ "startedTime": "1531405909444",
|
|
|
+ "finishedTime": "0",
|
|
|
+ "elapsedTime": "4112",
|
|
|
+ "logUrl": "http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest",
|
|
|
+ "containerExitStatus": "0",
|
|
|
+ "containerState": "RUNNING",
|
|
|
+ "nodeHttpAddress": "http://host.domain.com:8042",
|
|
|
+ "nodeId": "host.domain.com:37814",
|
|
|
+ "allocatedResources": [
|
|
|
+ {
|
|
|
+ "key": "memory-mb",
|
|
|
+ "value": "1536"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "key": "vcores",
|
|
|
+ "value": "1"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+**XML response**
|
|
|
+
|
|
|
+HTTP Request:
|
|
|
+
|
|
|
+ GET http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts/{appAttemptId}/containers/{containerId}
|
|
|
+ Accept: application/xml
|
|
|
+
|
|
|
+Response Header:
|
|
|
+
|
|
|
+ HTTP/1.1 200 OK
|
|
|
+ Content-Type: application/xml
|
|
|
+ Content-Length: 1104
|
|
|
+ Server: Jetty(6.1.26)
|
|
|
+
|
|
|
+Response Body:
|
|
|
+
|
|
|
+```xml
|
|
|
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
+
|
|
|
+<container>
|
|
|
+ <containerId>container_1531404209605_0008_01_000001</containerId>
|
|
|
+ <allocatedMB>1536</allocatedMB>
|
|
|
+ <allocatedVCores>1</allocatedVCores>
|
|
|
+ <assignedNodeId>host.domain.com:37814</assignedNodeId>
|
|
|
+ <priority>0</priority>
|
|
|
+ <startedTime>1531405909444</startedTime>
|
|
|
+ <finishedTime>0</finishedTime>
|
|
|
+ <elapsedTime>4112</elapsedTime>
|
|
|
+ <logUrl>
|
|
|
+ http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest
|
|
|
+ </logUrl>
|
|
|
+ <containerExitStatus>0</containerExitStatus>
|
|
|
+ <containerState>RUNNING</containerState>
|
|
|
+ <nodeHttpAddress>http://host.domain.com:8042</nodeHttpAddress>
|
|
|
+ <nodeId>host.domain.com:37814</nodeId>
|
|
|
+ <allocatedResources>
|
|
|
+ <entry>
|
|
|
+ <key>memory-mb</key>
|
|
|
+ <value>1536</value>
|
|
|
+ </entry>
|
|
|
+ <entry>
|
|
|
+ <key>vcores</key>
|
|
|
+ <value>1</value>
|
|
|
+ </entry>
|
|
|
+ </allocatedResources>
|
|
|
+</container>
|
|
|
+```
|
|
|
+
|
|
|
Cluster Nodes API
|
|
|
-----------------
|
|
|
|