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

David Mollitor commented on HIVE-23037:
---------------------------------------

[~pvary] Hey.  Thanks for the context.

I was able to track the error to a NPE in the code.  That bug is now fixed, but 
I don't want to have to deal with that again.

The log is currently ERROR, so that is going to be scary no matter what, 
especially when one is trying to troubleshoot an issue.  That is going to catch 
the eye.

How about a WARN?

Also, {{Throwable}} is not a normal thing to catch in application code.  
{{Throwable}} covers {{Exception}} and {{Error}}.  An {{Error}} in Java is a 
very serious (fatal) error and should not be caught in the application code 
like this.  It should bubble up very far up the stack (and probably just cause 
a JVM exit).

With this new context, maybe I should make {{UnsupportedOperationException}} 
its own block.  That is probably the error condition you are talking about?

{code:java}
try {
    ...
} catch (UnsupportedOperationException uoe) {
    LOG.info("Failed to get files with ID; using regular API {}" 
uoe.getMessage());
    ....
} catch (Exception e) {
    LOG.error ("Error", e);
}
{code}

> Print Logging Information for Exception in AcidUtils tryListLocatedHdfsStatus
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-23037
>                 URL: https://issues.apache.org/jira/browse/HIVE-23037
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>         Attachments: HIVE-23037.1.patch
>
>
> Was recently trying to troubleshoot an issue and all I got for a log 
> statement was:
> {code:none}
> Failed to get files with ID; using regular API: null
> {code}
> No stacktrace, no error message, nothing.



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

Reply via email to