hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sohan Jain" <>
Subject Re: Review Request: HIVE-2338: Alter table always throws an unhelpful error on failure
Date Wed, 03 Aug 2011 23:59:06 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated 2011-08-03 23:59:06.774216)

Review request for hive and Paul Yang.


-remove unecessary comment


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.

Diffs (updated)

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



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



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message