You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Marta Kuczora via Review Board <no...@reviews.apache.org> on 2018/04/05 13:43:54 UTC

Re: Review Request 66359: HIVE-19076: Fix NPE and TApplicationException in function related HiveMetastore methods

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

(Updated April 5, 2018, 1:43 p.m.)


Review request for hive, Peter Vary and Adam Szita.


Changes
-------

Rebased the patch and fixed the issues which came up.


Bugs: HIVE-19076
    https://issues.apache.org/jira/browse/HIVE-19076


Repository: hive-git


Description
-------

The TestFunctions tests revealed that NPE is thrown in some cases. These NPEs could be prevented with a simple null check and a MetaException with a proper error message should be thrown instead.

Also there are some alter function tests where InvalidObjectException is thrown with Embedded MetaStore, but TApplicationException it thrown with Remote MetaStore. The reason is that the InvalidObjectException is not defined for the alter_function method in the thrift interface, so we got the TApplicationException when the InvalidObjectException was thrown. In these cases the InvalidObjectException could be handled on the server side and re-throw it as a MetaException


Diffs (updated)
-----

  standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 8539fea 
  standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java ebbf465 
  standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestFunctions.java 9857c4e 


Diff: https://reviews.apache.org/r/66359/diff/2/

Changes: https://reviews.apache.org/r/66359/diff/1-2/


Testing
-------


Thanks,

Marta Kuczora


Re: Review Request 66359: HIVE-19076: Fix NPE and TApplicationException in function related HiveMetastore methods

Posted by Peter Vary via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66359/#review200549
-----------------------------------------------------------


Ship it!




LGTM +1


standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
Line 6912 (original), 6957 (patched)
<https://reviews.apache.org/r/66359/#comment281279>

    Note for later: We should think about this startFunction/endFunction usage. In several cases we can have Exceptions which can cause uneven start/end calls. Also if the checks take more time, then we miss some runtime....


- Peter Vary


On April 5, 2018, 1:43 p.m., Marta Kuczora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66359/
> -----------------------------------------------------------
> 
> (Updated April 5, 2018, 1:43 p.m.)
> 
> 
> Review request for hive, Peter Vary and Adam Szita.
> 
> 
> Bugs: HIVE-19076
>     https://issues.apache.org/jira/browse/HIVE-19076
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> The TestFunctions tests revealed that NPE is thrown in some cases. These NPEs could be prevented with a simple null check and a MetaException with a proper error message should be thrown instead.
> 
> Also there are some alter function tests where InvalidObjectException is thrown with Embedded MetaStore, but TApplicationException it thrown with Remote MetaStore. The reason is that the InvalidObjectException is not defined for the alter_function method in the thrift interface, so we got the TApplicationException when the InvalidObjectException was thrown. In these cases the InvalidObjectException could be handled on the server side and re-throw it as a MetaException
> 
> 
> Diffs
> -----
> 
>   standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 8539fea 
>   standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java ebbf465 
>   standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestFunctions.java 9857c4e 
> 
> 
> Diff: https://reviews.apache.org/r/66359/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marta Kuczora
> 
>