You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org> on 2011/08/03 06:13:28 UTC

[jira] [Commented] (HIVE-2338) Alter table always throws an unhelpful error on failure

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

jiraposter@reviews.apache.org commented on HIVE-2338:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1276/
-----------------------------------------------------------

Review request for hive and Paul Yang.


Summary
-------

Every failure in an alter table function always return a MetaException. When altering tables and catching exceptions, we throw a MetaException in the "finally" part of a try-catch-finally block, which overrides any other exceptions thrown.

This patch moves the code to throw an error on a commit failure outside of the try-catch-finally block.  So any errors within the try block are thrown properly.  Only when success == false will we throw a MetaException.


This addresses bug HIVE-2338.
    https://issues.apache.org/jira/browse/HIVE-2338


Diffs
-----

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 1152020 

Diff: https://reviews.apache.org/r/1276/diff


Testing
-------

Tested failing alter table metastore commands; they threw InvalidOperationExceptions as they should, instead of meaningless MetaExceptions.


Thanks,

Sohan



> Alter table always throws an unhelpful error on failure
> -------------------------------------------------------
>
>                 Key: HIVE-2338
>                 URL: https://issues.apache.org/jira/browse/HIVE-2338
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Sohan Jain
>            Assignee: Sohan Jain
>            Priority: Minor
>         Attachments: HIVE-2338.1.patch
>
>
> Every failure in an alter table function always return a MetaException. When altering tables and catching exceptions, we throw a MetaException in the "finally" part of a try-catch-finally block, which overrides any other exceptions thrown.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira