[
https://issues.apache.org/jira/browse/YARN-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198976#comment-16198976
]
Eric Yang commented on YARN-7202:
---------------------------------
[~jianhe] wrote:
{code}
Confused. I'm seeing the opposite.
Before the patch, it directly returns the status code based on whatever failure
conditions it is inside the method which is accurate.
After the patch, it only returns INTERNAL_SERVER_ERROR or BAD_REQUEST. e.g. the
NOT_FOUND status code for stopService method is instead converted to the
BAD_REQUEST status code. Why is this converstion needed?
{code}
In ServiceClient, YarnException is used for invalid request, i.e. Service Name
not found, Application already exist, lost contact to AM, or Service definition
is not found in HDFS. There are many other exceptions overloaded using
YarnException and all of them are general error handling. We end up with web
response that are inconsistent between Web response code and the root cause,
such as 404 NOT_FOUND, and application already exist. This is the reason the
response code is generalized into BAD_REQUEST to avoid confusion.
> End-to-end 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
> 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
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]