[
https://issues.apache.org/jira/browse/HIVE-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890722#action_12890722
]
Bennie Schut commented on HIVE-1126:
------------------------------------
Ok some more on the synchronized client on getTables.
This discussion on thrift show what I also noticed:
http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200911.mbox/%[email protected]%3e
So the way I see it is we have two options.
1) we synchronize the client calls when we use them (like I already did). This
should not be a problem since you wouldn't expect massive amounts of calls on
this.
2) when a call is made to Connection.getMetaData() we should create a new
client connection and thus become thread safe.
Option two has a bit more risk involving connection leaking. I noticed the
close() on the HiveConnection is explicitly calling a "transport.close()" so I
could keep track of all the connections we handout to also close during that
close, however how do you cleanup a connection of a DatabaseMetaData object
after it's used? If it's automatically garbage collected then I'm wondering why
we have the explicit close now.
Bennie.
> Missing some Jdbc functionality like getTables getColumns and
> HiveResultSet.get* methods based on column name.
> --------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-1126
> URL: https://issues.apache.org/jira/browse/HIVE-1126
> Project: Hadoop Hive
> Issue Type: Improvement
> Components: Clients
> Affects Versions: 0.7.0
> Reporter: Bennie Schut
> Assignee: Bennie Schut
> Priority: Minor
> Fix For: 0.7.0
>
> Attachments: HIVE-1126-1.patch, HIVE-1126-2.patch, HIVE-1126.patch,
> HIVE-1126_patch(0.5.0_source).patch
>
>
> I've been using the hive jdbc driver more and more and was missing some
> functionality which I added
> HiveDatabaseMetaData.getTables
> Using "show tables" to get the info from hive.
> HiveDatabaseMetaData.getColumns
> Using "describe tablename" to get the columns.
> This makes using something like SQuirreL a lot nicer since you have the list
> of tables and just click on the content tab to see what's in the table.
> I also implemented
> HiveResultSet.getObject(String columnName) so you call most get* methods
> based on the column name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.