[
https://issues.apache.org/jira/browse/YARN-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16227078#comment-16227078
]
Eric Yang commented on YARN-7202:
---------------------------------
[~gsaha] We changed from NO_CONTENT to OK because YARN-7073 have craft the
service operation startService to return OK for successful operation. In
[Billie's
comment|https://issues.apache.org/jira/browse/YARN-7202?focusedCommentId=16207652&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16207652],
we made both start and stop service consistent to return OK as a bug fix
spotted by this unit test.
When stopping an application that does not have a state with Resource Manager
and the application is deployed on HDFS, Resource Manager throws
ApplicationNotFound exception. In this case, user ask the system to perform an
action that can not be performed. Hence, the user input is invalid input in
this scope. This is the reason that we changed the response to BAD_REQUEST.
The previous implementation of returning NOT_FOUND for Yarn Service throw me
off a couple days for unable to figure out the application was deployed on
HDFS, but API reporting not found. It was confusing to developer and user's
expectation. This is the reason that we changed from NOT_FOUND to BAD_REQUEST
for stopping an application, that is already in STOPPED state. Hope this
explanation is useful for future reference. If there is any other improvement
regarding REST API code, please open new JIRA for discussion. Thanks
> Add UT for api-server
> ---------------------
>
> Key: YARN-7202
> URL: https://issues.apache.org/jira/browse/YARN-7202
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Jian He
> Assignee: Eric Yang
> Fix For: yarn-native-services
>
> Attachments: YARN-7202.yarn-native-services.001.patch,
> YARN-7202.yarn-native-services.002.patch,
> YARN-7202.yarn-native-services.003.patch,
> YARN-7202.yarn-native-services.004.patch,
> YARN-7202.yarn-native-services.005.patch,
> YARN-7202.yarn-native-services.006.patch,
> YARN-7202.yarn-native-services.007.patch,
> YARN-7202.yarn-native-services.008.patch,
> YARN-7202.yarn-native-services.011.patch,
> YARN-7202.yarn-native-services.012.patch,
> YARN-7202.yarn-native-services.013.patch,
> YARN-7202.yarn-native-services.014.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]