hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [29/50] [abbrv] hadoop git commit: YARN-9122. Add table of contents to YARN Service API document. Contributed by Zhankun Tang.
Date Sat, 15 Dec 2018 19:16:35 GMT
YARN-9122. Add table of contents to YARN Service API document. Contributed by Zhankun Tang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/26e55d4c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/26e55d4c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/26e55d4c

Branch: refs/heads/HDFS-13891
Commit: 26e55d4ceb691f47801fa5f0ba1147a5bc413f96
Parents: b2d7204
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Sat Dec 15 10:29:47 2018 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Sat Dec 15 10:29:47 2018 +0900

----------------------------------------------------------------------
 .../markdown/yarn-service/YarnServiceAPI.md     | 57 +++++++++++++++-----
 1 file changed, 43 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/26e55d4c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
index e863ccc..5228eab 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
@@ -12,8 +12,11 @@
   limitations under the License. See accompanying LICENSE file.
 -->
 
-# YARN Service API 
+# YARN Service API
 
+<!-- MACRO{toc|fromDepth=0|toDepth=2} -->
+
+## Introduction
 Bringing a new service on YARN today is not a simple experience. The APIs of existing
 frameworks are either too low level (native YARN), require writing new code (for frameworks
with programmatic APIs)
 or writing a complex spec (for declarative frameworks).
@@ -433,9 +436,11 @@ The current status of a submitted service, returned as a response to
the GET API
 ## Examples
 
 ### Create a simple single-component service with most attribute values as defaults
+```
 POST URL - http://localhost:8088/app/v1/services
+```
 
-##### POST Request JSON
+#### POST Request JSON
 ```json
 {
   "name": "hello-world",
@@ -460,8 +465,10 @@ POST URL - http://localhost:8088/app/v1/services
 }
 ```
 
-##### GET Response JSON
+#### GET Response JSON
+```
 GET URL - http://localhost:8088/app/v1/services/hello-world
+```
 
 Note, lifetime value of -1 means unlimited lifetime.
 
@@ -522,9 +529,11 @@ Note, lifetime value of -1 means unlimited lifetime.
 
 ```
 ### Update to modify the lifetime of a service
+```
 PUT URL - http://localhost:8088/app/v1/services/hello-world
+```
 
-##### PUT Request JSON
+#### PUT Request JSON
 
 Note, irrespective of what the current lifetime value is, this update request will set the
lifetime of the service to be 3600 seconds (1 hour) from the time the request is submitted.
Hence, if a a service has remaining lifetime of 5 mins (say) and would like to extend it to
an hour OR if an application has remaining lifetime of 5 hours (say) and would like to reduce
it down to an hour, then for both scenarios you need to submit the same request below.
 
@@ -534,9 +543,11 @@ Note, irrespective of what the current lifetime value is, this update
request wi
 }
 ```
 ### Stop a service
+```
 PUT URL - http://localhost:8088/app/v1/services/hello-world
+```
 
-##### PUT Request JSON
+#### PUT Request JSON
 ```json
 {
   "state": "STOPPED"
@@ -544,9 +555,11 @@ PUT URL - http://localhost:8088/app/v1/services/hello-world
 ```
 
 ### Start a service
+```
 PUT URL - http://localhost:8088/app/v1/services/hello-world
+```
 
-##### PUT Request JSON
+#### PUT Request JSON
 ```json
 {
   "state": "STARTED"
@@ -554,9 +567,11 @@ PUT URL - http://localhost:8088/app/v1/services/hello-world
 ```
 
 ### Update to flex up/down the number of containers (instances) of a component of a service
+```
 PUT URL - http://localhost:8088/app/v1/services/hello-world/components/hello
+```
 
-##### PUT Request JSON
+#### PUT Request JSON
 ```json
 {
   "number_of_containers": 3
@@ -564,9 +579,11 @@ PUT URL - http://localhost:8088/app/v1/services/hello-world/components/hello
 ```
 
 Alternatively, you can specify the entire "components" section instead.
-
+```
 PUT URL - http://localhost:8088/app/v1/services/hello-world
-##### PUT Request JSON
+```
+
+#### PUT Request JSON
 ```json
 {
   "state": "FLEX",
@@ -581,14 +598,18 @@ PUT URL - http://localhost:8088/app/v1/services/hello-world
 ```
 
 ### Destroy a service
+```
 DELETE URL - http://localhost:8088/app/v1/services/hello-world
+```
 
 ***
 
 ### Create a complicated service  - HBase
+```
 POST URL - http://localhost:8088:/app/v1/services/hbase-app-1
+```
 
-##### POST Request JSON
+#### POST Request JSON
 
 ```json
 {
@@ -685,9 +706,11 @@ POST URL - http://localhost:8088:/app/v1/services/hbase-app-1
 ```
 
 ### Create a service requesting GPUs in addition to CPUs and RAM
+```
 POST URL - http://localhost:8088/app/v1/services
+```
 
-##### POST Request JSON
+#### POST Request JSON
 ```json
 {
   "name": "hello-world",
@@ -719,9 +742,11 @@ POST URL - http://localhost:8088/app/v1/services
 ```
 
 ### Create a service with a component requesting anti-affinity placement policy
+```
 POST URL - http://localhost:8088/app/v1/services
+```
 
-##### POST Request JSON
+#### POST Request JSON
 ```json
 {
   "name": "hello-world",
@@ -765,8 +790,10 @@ POST URL - http://localhost:8088/app/v1/services
 }
 ```
 
-##### GET Response JSON
+#### GET Response JSON
+```
 GET URL - http://localhost:8088/app/v1/services/hello-world
+```
 
 Note, for an anti-affinity component no more than 1 container will be allocated
 in a specific node. In this example, 3 containers have been requested by
@@ -861,9 +888,11 @@ non-STABLE state.
 ```
 
 ### Create a service with health threshold monitor enabled for a component
+```
 POST URL - http://localhost:8088/app/v1/services
+```
 
-##### POST Request JSON
+#### POST Request JSON
 ```json
 {
   "name": "hello-world",


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


Mime
View raw message