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

Szilard Nemeth commented on YARN-9545:
--------------------------------------

Hi [~zsiegl]!

Couple of thoughts:
1. Please fix the javadoc of method: TimelineReaderWebServices#health,
"Health check rest end point." should be changed to "Health check REST 
endpoint." or something like that.

Please also change the return value description in the javadoc as well, as it 
seems odd.
This could be the value of it, as an example: 
   
{code:java}
* @return A {@link Response} object with HTTP status 200 OK if the service is 
running.
   *         Otherwise, a {@link Response} object with HTTP status 500 is
   *         returned.
{code}


2. Still in TimelineReaderWebServices#health, you have an unnecessary line 
break after the try-statement.
3. Still in TimelineReaderWebServices#health, please adhere to the 80 character 
line limit, so the code here should be reformatted.
4. I can see that you added an implementation of 
org.apache.hadoop.yarn.server.timelineservice.storage.FileSystemTimelineReaderImpl#isConnectionAlive,
 but I can't see any usages of the isConnectionAlive method. 
Do you know the reason for this? 
5. Can you add some tests for the health check? 
6. Please address the findbugs / checkstyle issues

Thanks!

> Create healthcheck REST endpoint for ATSv2
> ------------------------------------------
>
>                 Key: YARN-9545
>                 URL: https://issues.apache.org/jira/browse/YARN-9545
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: ATSv2
>    Affects Versions: 3.1.2
>            Reporter: Zoltan Siegl
>            Assignee: Zoltan Siegl
>            Priority: Major
>         Attachments: YARN-9545.001.patch, YARN-9545.002.patch
>
>
> RM UI2 and CM needs a health check url for ATSv2 service.
> Create a /health rest endpoint
>  * must respond with 200 \{health: ok} if all ok
>  * must respond with non 200 if any problem occurs
>  * could check reader/writer connection



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to