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 a72d7e4..627db5f 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 @@ -38,6 +38,9 @@ ResourceManager REST API's. * [Cluster Reservation API Submit](#Cluster_Reservation_API_Submit) * [Cluster Reservation API Update](#Cluster_Reservation_API_Update) * [Cluster Reservation API Delete](#Cluster_Reservation_API_Delete) +* [Cluster Application Timeouts API](#Cluster_Application_Timeouts_API) +* [Cluster Application Timeout API](#Cluster_Application_Timeout_API) +* [Cluster Application Timeout Update API](#Cluster_Application_Timeout_Update_API) Overview -------- @@ -4031,3 +4034,250 @@ Server: Jetty(6.1.26) Response Body: No response body + +Cluster Application Timeouts API +-------------------------------- + +The Cluster Application Timeouts API can be used to get all configured timeouts of an application. When you run a GET operation on this resource, you obtain a collection of Application Timeout Objects. Each timeout object represent timeout type, expiry-time and remaining time in seconds. + + +### URI + + * http:///ws/v1/cluster/apps/{appid}/timeouts + +### HTTP Operations Supported + + * GET + +### Elements of the *timeouts* (Application Timeouts) object + +When you make a request for the list of application timeouts, the information will be returned as a collection of timeout objects. See also [Cluster Application Timeout API](#Cluster_Application_Timeout_API) for syntax of the timeout object. + +| Item | Data Type | Description | +|:---- |:---- |:---- | +| timeout | array of timeout objects(JSON)/zero or more application objects(XML) | The collection of application timeout objects | + +**JSON response** + +HTTP Request: + + Accept: application/json + GET http:///ws/v1/cluster/apps/{appid}/timeouts + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/json + Transfer-Encoding: chunked + Server: Jetty(6.1.26) + +Response Body: + +```json +{ + "timeouts": + { + "timeout": + [ + { + "type": "LIFETIME", + "expiryTime": "UNLIMITED", + "remainingTimeInSeconds": -1 + } + ] + } +} +``` + +**XML response** + +HTTP Request: + + Accept: application/xml + GET http:///ws/v1/cluster/apps/{appid}/timeouts + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/xml + Content-Length: 712 + Server: Jetty(6.1.26) + +Response Body: + +```xml + + + + LIFETIME + UNLIMITED + -1 + + +``` + +Cluster Application Timeout API +-------------------------------- + +The Cluster Application Timeout resource contains information about timeout. + + +### URI + + * http:///ws/v1/cluster/apps/{appid}/timeout/{type} + +### HTTP Operations Supported + + * GET + +### Elements of the *timeout* (Application Timeout) object + +| Item | Data Type | Description | +|:---- |:---- |:---- | +| type | string | Timeout type. Valid values are the members of the ApplicationTimeoutType enum: LIFETIME | +| expiryTime | string | Time at which application will get expired in ISO8601 yyyy-MM-dd'T'HH:mm:ss.SSSZ format. If UNLIMITED, then application will run forever. | +| remainingTimeInSeconds | long | Remaining time for configured application timeout. -1 indicates that application is not configured with timeout. Zero(0) indicates that application has expired with configured timeout type. | + +**JSON response** + +HTTP Request: + + Accept: application/json + GET http:///ws/v1/cluster/apps/{appid}/timeout/LIFETIME + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/json + Transfer-Encoding: chunked + Server: Jetty(6.1.26) + +Response Body: + +```json +{ +"timeout": + { + "type": "LIFETIME", + "expiryTime": "UNLIMITED", + "remainingTimeInSeconds": -1 + } +} +``` + +**XML response** + +HTTP Request: + + Accept: application/xml + GET http:///ws/v1/cluster/apps/{appid}/timeout/LIFETIME + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/xml + Content-Length: 712 + Server: Jetty(6.1.26) + +Response Body: + +```xml + + + LIFETIME + UNLIMITED + -1 + +``` + +Cluster Application Timeout Update API +-------------------------------- + +Update timeout of an application for given timeout type. + + +### URI + + * http:///ws/v1/cluster/apps/{appid}/timeout + +### HTTP Operations Supported + + * PUT + +### Elements of the *timeout* object + +| Item | Data Type | Description | +|:---- |:---- |:---- | +| type | string | Timeout type. Valid values are the members of the ApplicationTimeoutType enum: LIFETIME | +| expiryTime | string | Time at which application will get expired in ISO8601 yyyy-MM-dd'T'HH:mm:ss.SSSZ format. | + +**JSON response** + +HTTP Request: + +```json + Accept: application/json + GET http:///ws/v1/cluster/apps/{appid}/timeout + Content-Type: application/json + { + "timeout": + { + "type": "LIFETIME", + "expiryTime": "2016-11-27T09:36:16.678+05:30" + } + } +``` + + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/json + Transfer-Encoding: chunked + Server: Jetty(6.1.26) + +Response Body: + +```json +{ +"timeout": + { + "type": "LIFETIME", + "expiryTime": "2016-11-27T09:36:16.678+05:30", + "remainingTimeInSeconds": 90 + } +} +``` + +**XML response** + +HTTP Request: + +```xml + Accept: application/xml + GET http:///ws/v1/cluster/apps/{appid}/timeout + Content-Type: application/xml + + + LIFETIME + 2016-11-27T09:36:16.678+05:30 + +``` + +Response Header: + + HTTP/1.1 200 OK + Content-Type: application/xml + Content-Length: 712 + Server: Jetty(6.1.26) + +Response Body: + +```xml + + + LIFETIME + 2016-11-27T09:36:16.678+05:30 + 90 + +``` \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnCommands.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnCommands.md index 1d51b1f..75f6f10 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnCommands.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnCommands.md @@ -76,6 +76,7 @@ Usage: `yarn application [options] ` | -movetoqueue \ | Moves the application to a different queue. | | -queue \ | Works with the movetoqueue command to specify which queue to move an application to. | | -status \ | Prints the status of the application. | +| -updateLifetime \ | Update timeout of an application from NOW. ApplicationId can be passed using 'appId' option. Timeout value is in seconds. | | -updatePriority \ | Update priority of an application. ApplicationId can be passed using 'appId' option. | Prints application(s) report/kill application