You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Sohan Jain <so...@fb.com> on 2011/06/02 02:19:55 UTC

Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

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

Review request for hive and Paul Yang.


Summary
-------

Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.


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


Diffs
-----

  trunk/metastore/if/hive_metastore.thrift 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1130342 
  trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java 1130342 

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


Testing
-------

Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.


Thanks,

Sohan


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.

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


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

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


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

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


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

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


> On 2011-06-06 22:18:08, Carl Steinbach wrote:
> > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line 802
> > <https://reviews.apache.org/r/831/diff/2/?file=20590#file20590line802>
> >
> >     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:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/831/
> -----------------------------------------------------------
> 
> (Updated 2011-06-07 01:11:44)
> 
> 
> Review request for hive, Paul Yang and Ashutosh Chauhan.
> 
> 
> Summary
> -------
> 
> Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.
> 
> 
> This addresses bug HIVE-2188.
>     https://issues.apache.org/jira/browse/HIVE-2188
> 
> 
> Diffs
> -----
> 
>   trunk/metastore/if/hive_metastore.thrift 1130342 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1130342 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1130342 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1130342 
>   trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1130342 
> 
> Diff: https://reviews.apache.org/r/831/diff
> 
> 
> Testing
> -------
> 
> Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.
> 
> 
> Thanks,
> 
> Sohan
> 
>


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/
-----------------------------------------------------------

(Updated 2011-06-08 02:53:35.735457)


Review request for hive, Paul Yang and Ashutosh Chauhan.


Changes
-------

- added getTableObjectsByName to IMetaStoreClient and HiveMetaStoreClient
- modified the unit tests to reflect this change


Summary
-------

Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.


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


Diffs (updated)
-----

  trunk/metastore/if/hive_metastore.thrift 1133230 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1133230 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1133230 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1133230 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1133230 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1133230 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1133230 

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


Testing
-------

Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.


Thanks,

Sohan


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.

> On 2011-06-07 20:09:34, Carl Steinbach wrote:
> > trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java, line 748
> > <https://reviews.apache.org/r/831/diff/3/?file=20654#file20654line748>
> >
> >     Sorry I missed this before, but you need to add a getTableObjectsByName() method to IMetaStoreClient and HiveMetaStoreClient, and use that method here instead of calling client.client.get_table_objects_by_name(). Everything else looks good so, so you can either update this patch, or else open another ticket to address this issue. Please let me know what you want to do. Thanks.

Hi Carl, I have updated the patch here.  Thanks for your help.


- Sohan


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


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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Carl Steinbach <ca...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/#review778
-----------------------------------------------------------



trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
<https://reviews.apache.org/r/831/#comment1676>

    Sorry I missed this before, but you need to add a getTableObjectsByName() method to IMetaStoreClient and HiveMetaStoreClient, and use that method here instead of calling client.client.get_table_objects_by_name(). Everything else looks good so, so you can either update this patch, or else open another ticket to address this issue. Please let me know what you want to do. Thanks.


- Carl


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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/
-----------------------------------------------------------

(Updated 2011-06-07 01:11:44.582629)


Review request for hive, Paul Yang and Ashutosh Chauhan.


Changes
-------

- included Carl's suggestions.
- get_table_objects_by_name retrieves only the tables that it can, and does not fail out if it cannot retrieve a table.  
- removed the ordering of tables returned, since there is no guarantee every requested table is returned
- modified unit tests


Summary
-------

Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.


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


Diffs (updated)
-----

  trunk/metastore/if/hive_metastore.thrift 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1130342 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1130342 

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


Testing
-------

Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.


Thanks,

Sohan


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/
-----------------------------------------------------------

(Updated 2011-06-06 21:09:54.167933)


Review request for hive, Paul Yang and Ashutosh Chauhan.


Changes
-------

- Changed function name to get_multi_table
- Fixed returned ordering of requested tables
- Moved and added additional test cases


Summary
-------

Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.


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


Diffs (updated)
-----

  trunk/metastore/if/hive_metastore.thrift 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1130342 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1130342 

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


Testing
-------

Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.


Thanks,

Sohan


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.

> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/metastore/if/hive_metastore.thrift, line 249
> > <https://reviews.apache.org/r/831/diff/1/?file=20144#file20144line249>
> >
> >     How about calling it get_multi_table instead? multi_get_table sounds little confusing to me.

Ok, get_multi_table definitely sounds better.


> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, line 521
> > <https://reviews.apache.org/r/831/diff/1/?file=20145#file20145line521>
> >
> >     You can write this more concisely using commons-lang utility method as: StringUtils.join(tbls,',');

Thanks for the tip; I changed this.


> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, line 1182
> > <https://reviews.apache.org/r/831/diff/1/?file=20145#file20145line1182>
> >
> >     You can get rid of tables.get(i) == null check that will never be true.

I cleaned up the checks for seeing if the db had all the requested tables.  Also, I realized that I did not guarantee returning tables in the same order as those requested, so I fixed that up too.


> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, line 1195
> > <https://reviews.apache.org/r/831/diff/1/?file=20145#file20145line1195>
> >
> >     Instead of throwing RuntimeException, create MetaException and throw that.

I changed it to throw a MetaException instead.  However, the other metastore operations (e.g., get_table, append_partition) throw RuntimException, which is what I based get_multi_table off.


> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java, line 221
> > <https://reviews.apache.org/r/831/diff/1/?file=20148#file20148line221>
> >
> >     This test really belongs in the TestMetastore or some such in metastore dir not in HiveServer.

Thanks for the pointer and for the feedback.


- Sohan


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


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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Carl Steinbach <ca...@cloudera.com>.

> On 2011-06-03 14:04:02, Ashutosh Chauhan wrote:
> > trunk/metastore/if/hive_metastore.thrift, line 249
> > <https://reviews.apache.org/r/831/diff/1/?file=20144#file20144line249>
> >
> >     How about calling it get_multi_table instead? multi_get_table sounds little confusing to me.
> 
> Sohan Jain wrote:
>     Ok, get_multi_table definitely sounds better.

"get_tables" is probably the ideal name, but unfortunately that's already taken by a function that should really be called "get_table_names_by_pattern". In order to avoid this problem going forward, what do you think of changing the name to "get_table_objects"?


- Carl


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


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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Ashutosh Chauhan <ha...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/#review753
-----------------------------------------------------------



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

    How about calling it get_multi_table instead? multi_get_table sounds little confusing to me.



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

    You can write this more concisely using commons-lang utility method as: StringUtils.join(tbls,',');



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

    You can get rid of tables.get(i) == null check that will never be true.



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

    Instead of throwing RuntimeException, create MetaException and throw that.



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

    Please add javadocs for new methods introduced in interface. Also see my first comment for name.



trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java
<https://reviews.apache.org/r/831/#comment1575>

    This test really belongs in the TestMetastore or some such in metastore dir not in HiveServer.


- Ashutosh


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


Re: Review Request: HIVE-2188: Add a function to retrieve multiple tables on trip to the hive metastore

Posted by Sohan Jain <so...@fb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/831/
-----------------------------------------------------------

(Updated 2011-06-02 23:01:00.830757)


Review request for hive, Paul Yang and Ashutosh Chauhan.


Summary
-------

Created a function "multi_get_table" that retrieves multiple tables on one trip to the hive metastore, saving round trip time.


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


Diffs
-----

  trunk/metastore/if/hive_metastore.thrift 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1130342 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 1130342 
  trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java 1130342 

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


Testing
-------

Added a test case to testMetasore() in TestHiveServer.  Also tested for speed improvements in a client session.


Thanks,

Sohan