From common-commits-return-86239-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Jul 31 11:25:56 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3D92118077F for ; Tue, 31 Jul 2018 11:25:55 +0200 (CEST) Received: (qmail 76363 invoked by uid 500); 31 Jul 2018 09:25:44 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 75576 invoked by uid 99); 31 Jul 2018 09:25:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2018 09:25:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE881E1185; Tue, 31 Jul 2018 09:25:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ehiggs@apache.org To: common-commits@hadoop.apache.org Date: Tue, 31 Jul 2018 09:26:14 -0000 Message-Id: <8883c72af7bb4a09affb28c68e639934@git.apache.org> In-Reply-To: <4e533beaec11404caf0635c07bf3761a@git.apache.org> References: <4e533beaec11404caf0635c07bf3761a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [32/50] hadoop git commit: YARN-8566. Add diagnostic message for unschedulable containers (snemeth via rkanter) YARN-8566. Add diagnostic message for unschedulable containers (snemeth via rkanter) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fecbac49 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fecbac49 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fecbac49 Branch: refs/heads/HDFS-12090 Commit: fecbac499e2ae6b3334773a997d454a518f43e01 Parents: b429f19 Author: Robert Kanter Authored: Fri Jul 27 14:32:34 2018 -0700 Committer: Robert Kanter Committed: Fri Jul 27 14:32:34 2018 -0700 ---------------------------------------------------------------------- .../src/site/markdown/ResourceManagerRest.md | 285 +++++++++++++++++++ 1 file changed, 285 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/fecbac49/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md index a30677c..24c2319 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md @@ -2326,6 +2326,291 @@ Response Body: ``` +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 + + + + container_1531404209605_0008_01_000001 + 1536 + 1 + host.domain.com:37814 + 0 + 1531405909444 + 0 + 4112 + + http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest + + 0 + RUNNING + http://host.domain.com:8042 + host.domain.com:37814 + + + memory-mb + 1536 + + + vcores + 1 + + + + +``` + +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 + + + + container_1531404209605_0008_01_000001 + 1536 + 1 + host.domain.com:37814 + 0 + 1531405909444 + 0 + 4112 + + http://host.domain.com:8042/node/containerlogs/container_1531404209605_0008_01_000001/systest + + 0 + RUNNING + http://host.domain.com:8042 + host.domain.com:37814 + + + memory-mb + 1536 + + + vcores + 1 + + + +``` + Cluster Nodes API ----------------- --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org