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

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



bq.  On 2011-06-06 22:18:08, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, 
line 1153
bq.  > <https://reviews.apache.org/r/831/diff/2/?file=20589#file20589line1153>
bq.  >
bq.  >     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.

Sounds good.


bq.  On 2011-06-06 22:18:08, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, 
line 1164
bq.  > <https://reviews.apache.org/r/831/diff/2/?file=20589#file20589line1164>
bq.  >
bq.  >     This should probably be InvalidOperationException instead of 
NoSuchObjectException.
bq.  >     
bq.  >     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.

Ah ok thanks; it felt strange to throw a NoSuchObjectException there.


bq.  On 2011-06-06 22:18:08, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, 
line 1171
bq.  > <https://reviews.apache.org/r/831/diff/2/?file=20589#file20589line1171>
bq.  >
bq.  >     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.
bq.  >     
bq.  >     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.
bq.  >

I see your concern, I'll change it to retrieve only tables that are in the 
metastore.


bq.  On 2011-06-06 22:18:08, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, 
line 818
bq.  > <https://reviews.apache.org/r/831/diff/2/?file=20590#file20590line818>
bq.  >
bq.  >     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?
bq.  >

Sounds good.  Removing the ordering especially makes sense if we cannot 
guarantee that we return *every* table the caller requested.


bq.  On 2011-06-06 22:18:08, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, 
line 802
bq.  > <https://reviews.apache.org/r/831/diff/2/?file=20590#file20590line802>
bq.  >
bq.  >     It would be good to first check if the DB exists, and throw 
UnknownDBException if it's not found.

Will do.  As a side note, this check requires another db call, which may slow 
down the function a little.


- Sohan


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


On 2011-06-07 01:11:44, 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-07 01:11:44)
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