hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Yang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-7202) End-to-end UT for api-server
Date Tue, 10 Oct 2017 17:21:01 GMT

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

Eric Yang edited comment on YARN-7202 at 10/10/17 5:20 PM:
-----------------------------------------------------------

[~jianhe] wrote:
{quote}
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?
{quote}

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.


was (Author: eyang):
[~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: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message