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

jirapos...@reviews.apache.org commented on HIVE-2188:
-----------------------------------------------------


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



trunk/metastore/if/hive_metastore.thrift
<https://reviews.apache.org/r/831/#comment1650>

    Please consider changing this to "get_table_objects_by_name"
    
    This should also throw InvalidObjectException and UnknownDBException.
    



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
<https://reviews.apache.org/r/831/#comment1648>

    Maybe change this to "get_table_objects_by_name" in order to disambiguate 
from cases where we're returning only tables names, or applying a filter 
condition, etc. etc.



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
<https://reviews.apache.org/r/831/#comment1647>

    This should probably be InvalidOperationException instead of 
NoSuchObjectException.
    
    It might also be good to validate the dbname input parameter at this step, 
e.g. make sure it's not null and not an empty string.



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
<https://reviews.apache.org/r/831/#comment1646>

    Failing the entire operation if a single table in the input list is not 
defined seems like a bad idea since we're throwing away work that will have to 
be repeated on the next call. Furthermore, the exception doesn't contain any 
information about which table(s) are not defined, so the client will have to 
fetch a table list again and use this to construct the list of input tables for 
the next get_multi_table() call. In the meantime it's possible that someone 
will drop a table in the list, which will invalidate the next call.
    
    I think it would be better to modify the contract to state that if a table 
on the input list is not found in the metastore, then the table definition will 
not be included in the result. This means that the function will return an 
empty list if none of the tables in the input list are found in the metastore.
    



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
<https://reviews.apache.org/r/831/#comment1645>

    e.toString() actually returns a little more information than e.getMessage().



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/831/#comment1649>

    Change to getTableObjectsByName?



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/831/#comment1643>

    It would be good to first check if the DB exists, and throw 
UnknownDBException if it's not found.



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/831/#comment1644>

    Only some callers will care about having this ordering property satisfied, 
so instead of penalizing every caller with this performance hit, maybe it would 
be better to let the caller take care of this?
    


- Carl


On 2011-06-06 21:09:54, Sohan Jain wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/831/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-06-06 21:09:54)
bq.  
bq.  
bq.  Review request for hive, Paul Yang and Ashutosh Chauhan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Created a function "multi_get_table" that retrieves multiple tables on one 
trip to the hive metastore, saving round trip time.
bq.  
bq.  
bq.  This addresses bug HIVE-2188.
bq.      https://issues.apache.org/jira/browse/HIVE-2188
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metastore/if/hive_metastore.thrift 1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
1130342 
bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 
1130342 
bq.    
trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
 1130342 
bq.  
bq.  Diff: https://reviews.apache.org/r/831/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added a test case to testMetasore() in TestHiveServer.  Also tested for 
speed improvements in a client session.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sohan
bq.  
bq.



> Add multi_get_table function in Hive Metastore
> ----------------------------------------------
>
>                 Key: HIVE-2188
>                 URL: https://issues.apache.org/jira/browse/HIVE-2188
>             Project: Hive
>          Issue Type: New Feature
>          Components: Metastore
>            Reporter: Sohan Jain
>            Assignee: Sohan Jain
>            Priority: Minor
>         Attachments: HIVE-2188.1.patch, HIVE-2188.3.patch
>
>
> This function would get multiple tables from the hive metastore as opposed to 
> just one at a time, saving round trip time to the metastore.

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

Reply via email to