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

Vaibhav Gumashta commented on HIVE-5230:
----------------------------------------

[~prasadm] In case of a remote client, the client would issue an 
ExecuteStatement. In case of a blocking call (with runAsync set to false) the 
downstream SQLOperation#run throws an exception which gets passed to 
ThriftCLIService#ExecuteStatement, which is able to catch the exception and 
fill the TExecuteStatementResp#status (including the optional TStatus#sqlState, 
TStatus#errorCode,  TStatus#errorMessage) with HiveSQLException.toTStatus(e).
However, for an async call, the call would return and the client would poll on 
GetOperationStatus. In case of an error however, though the 
TGetOperationStatusResp#status will be set to ERROR_STATE but the optional 
TStatus#sqlState, TStatus#errorCode,  TStatus#errorMessage will not be set.  
Setting that would be very useful for the client and the error reporting 
behaviour would be the same as that in the blocking ExecuteStatement call. 
What's your take?

> Better error reporting by async threads in HiveServer2
> ------------------------------------------------------
>
>                 Key: HIVE-5230
>                 URL: https://issues.apache.org/jira/browse/HIVE-5230
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>            Reporter: Vaibhav Gumashta
>            Assignee: Prasad Mujumdar
>             Fix For: 0.13.0
>
>         Attachments: HIVE-5230.1.patch, HIVE-5230.1.patch
>
>
> [HIVE-4617|https://issues.apache.org/jira/browse/HIVE-4617] provides support 
> for async execution in HS2. When a background thread gets an error, currently 
> the client can only poll for the operation state and also the error with its 
> stacktrace is logged. However, it will be useful to provide a richer error 
> response like thrift API does with TStatus (which is constructed while 
> building a Thrift response object). 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to