hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-13901) Hivemetastore add partitions can be slow depending on filesystems
Date Thu, 02 Jun 2016 09:55:59 GMT

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

Steve Loughran commented on HIVE-13901:
---------------------------------------

Well, I'm not deeply involved enough in Hive to have any binding opinions, but I'd still be
rejecting this on the basis that you aren't initializing the inner cause of an exception,

StringifyException does dump the exception to a string, but in the process, removes it from
the data structures which exist precisely for the purpose of debugging wrapped exceptions.

irrespective of how {{MetaException }} was generated, or what constructor it has, it will
have an {{initCause()}} method. 

This will work

{code}
throw (MetaException)new MetaException(e.toString()).initCause(e);
{code}

or more verbosely
{code}
MetaException ex = new MetaException(e.toString());
ex.initCause(e);
throw ex;
{code}


Notice how I also switched from {{getMessage()}} to ((toString()}}. Some exceptions (NPE)
have a null getMessage().



> Hivemetastore add partitions can be slow depending on filesystems
> -----------------------------------------------------------------
>
>                 Key: HIVE-13901
>                 URL: https://issues.apache.org/jira/browse/HIVE-13901
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Metastore
>            Reporter: Rajesh Balamohan
>            Priority: Minor
>         Attachments: HIVE-13901.1.patch
>
>
> Depending on FS, creating external tables & adding partitions can be expensive (e.g
msck which adds all partitions).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message