hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gour Saha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7073) Rest API site documentation
Date Wed, 30 Aug 2017 18:10:00 GMT

    [ https://issues.apache.org/jira/browse/YARN-7073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16147714#comment-16147714
] 

Gour Saha commented on YARN-7073:
---------------------------------

[~jianhe], the 003 patch looks good. Few comments -

1.
{code}
+      summary: Get a service details
{code}
change to -
{code}
+      summary: Get details of a service
{code}

2.
In addition to lifetime update, PUT also supports flex up/down and stop/start of a service.
There is an example of flex up/down but is not captured in the swagger definition. Also, neither
the swagger definition nor the examples mention that PUT supports stop/start of a service.
I think we need to update the text _*"As of now, only update of lifetime is supported."*_
as shown below and mention about everything that PUT supports. The mention about upgrade operation
is marked as TBD already, so we should leave it as is, since our users should know that it
is an important feature and we will implement it soon.
{code}
   /services/{service_name}:
+    put:
+      summary: Update a service or upgrade the binary version of the components of a running
service
+      description: Update the runtime properties of a service. As of now, only update of
lifetime is supported. The PUT operation is also used to orchestrate an upgrade of the service
containers to a newer version of their artifacts(TBD) .
{code}
change to -
{code}
   /services/{service_name}:
+    put:
+      summary: Update a service or upgrade the binary version of the components of a running
service
+      description: Update the runtime properties of a service. Currently the following operations
are supported - update lifetime, flex up/down of one or more components, and stop/start a
service. The PUT operation is also used to orchestrate an upgrade of the service containers
to a newer version of their artifacts (TBD).
{code}

Examples of stop and start using PUT are as below -
{code}
### Stop a service
PUT URL - http://host.mycompany.com:9191/ws/v1/services/hello-world

##### PUT Request JSON
```json
{
    "state": "STOPPED"
}
```
{code}

{code}
### Start a service
PUT URL - http://host.mycompany.com:9191/ws/v1/services/hello-world

##### PUT Request JSON
```json
{
    "state": "STARTED",
    "lifetime": 3600
}
```
{code}

3.
The mention of _*"Not implemeted yet."*_ is a little ambiguous which can make users think
that we don't support delete. So slight change there.
{code}
+    delete:
+      summary: Destroy a service
+      description: Destroy a service and release all resources. This API might have to return
JSON data providing location of logs, etc. Not implemeted yet.
{code}
change to -
{code}
+    delete:
+      summary: Destroy a service
+      description: Destroy a service and release all resources. This API might have to return
JSON data providing location of logs, etc (TBD).
{code}


> Rest API site documentation
> ---------------------------
>
>                 Key: YARN-7073
>                 URL: https://issues.apache.org/jira/browse/YARN-7073
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: documentation, site
>            Reporter: Gour Saha
>            Assignee: Gour Saha
>         Attachments: YARN-7073-yarn-native-services.001.patch, YARN-7073-yarn-native-services.002.patch,
YARN-7073-yarn-native-services.003.patch
>
>
> Commit site documentation for REST API service, generated from the swagger definition
as a MD file.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message