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

Andrew Sherman commented on HIVE-18283:
---------------------------------------

Patch looks good to me.

If you do rework it again you might
1) change the order of arguments to assertEquals as the expected value is 
supposed to be first in junit
2) refactor out some of testGetHiveException() so that you can call
{noformat}
checkExpectedException("\t diagnostics: Application 
application_1508358311878_3322732 "
                + "failed 1 times due to ApplicationMaster for attempt "
                + "appattempt_1508358311878_3322732_000001 timed out. Failing 
the application.", 
         ErrorMsg.SPARK_CREATE_CLIENT_TIMEOUT);
checkExpectedException("\t diagnostics: Application 
application_1508358311878_3330000 "
                + "submitted by user hive to unknown queue: foo", 
         ErrorMsg.SPARK_CREATE_CLIENT_INVALID_QUEUE);
{noformat}
etc. as this would make it more readable and extendable.

But these are nits, the basic code is good and will be useful

> Better error message and error code for HoS exceptions
> ------------------------------------------------------
>
>                 Key: HIVE-18283
>                 URL: https://issues.apache.org/jira/browse/HIVE-18283
>             Project: Hive
>          Issue Type: Improvement
>          Components: Spark
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>         Attachments: HIVE-18283.0.patch, HIVE-18283.1.patch, 
> HIVE-18283.2.patch
>
>
> Right now HoS only use a few error codes. For the majority of the errors, 
> user will see an error code 1 followed by a lengthy stacktrace. This is not 
> ideal since:
> 1. It is often hard to find the root cause - sometimes it is hidden deeply 
> inside the stacktrace.
> 2. After identifying the root cause, it is not easy to find a fix. Often user 
> have to copy & paste the error message and google them. 
> 3. It is not clear whether the error is transient or not, depending on which 
> user may want to retry the query. 
> To improve the above, this JIRA propose to assign error code & canonical 
> error messages for different HoS errors. We can take advantage of the 
> existing {{ErrorMsg}} class.



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

Reply via email to