You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2021/06/04 11:00:00 UTC

[jira] [Commented] (HIVE-25184) ReExecDriver Only Run afterExecute If No Exceptions

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

Zoltan Haindrich commented on HIVE-25184:
-----------------------------------------

please provide details on the issue itself; and possibly a testcase - and not a "solution"!

> ReExecDriver Only Run afterExecute If No Exceptions
> ---------------------------------------------------
>
>                 Key: HIVE-25184
>                 URL: https://issues.apache.org/jira/browse/HIVE-25184
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Was recently troubleshooting an issue and noticed a NPE in the logs.  I tracked it down to {{ReExecDriver}} code.  The "afterExecute" code gets called if the Driver call succeed or fails. However, if there is a failure, the Driver is instructed to "clean up" by some internal try-catch and so there the afterExecute code fails with a NPE when it tried to read state out of the Driver class.
>  
> [https://github.com/apache/hive/blob/1cc87d09cf0514f3fb962a816babb7eea859163c/ql/src/java/org/apache/hadoop/hive/ql/reexec/ReExecDriver.java#L163-L170]
>  
> Move this afterExecute code into the try-catch block so it's only executed on success (and there is valid state within the Driver).  I looked at the code a bit and it seems like the only listener that handles this afterExecute code assumes the state is always valid, so there is currently no way to pass it 'null' on a failure or 'state' on a success.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)