You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Adarsh Sharma <ad...@orkash.com> on 2010/11/25 13:05:33 UTC

Re: Error while fetching Hive Metadata

Carl Steinbach wrote:
> Hi Adarsh,
>
> Hibernate will not work with Hive because Hibernate depends on the 
> ability to execute row-level insert, update and delete operations. 
> None of these operations are supported by Hive.
>
> Carl
>
> On Tue, Sep 21, 2010 at 3:18 AM, Bennie Schut <bschut@ebuddy.com 
> <ma...@ebuddy.com>> wrote:
>
>     Hi,
>
>     Not all jdbc calls are implemented. This would be one of them. I
>     don't think anyone tried to use hibernate with hive before,
>     probably because it's highly unlikely to work at this time since
>     it will produce sql which might not be understood by hive. In most
>     cases you want a pretty fine grain of control over the queries you
>     send to hive (or any other dwh system) for performance reasons so
>     I don't think it's something people are actively working on.
>
>     As an alternative you might want to look at the apache commons
>     dbcp for connection pooling. We used it for a while but stopped
>     using it because of some out of PermGen issues (which probably was
>     unrelated). We combined this with Spring Templates to make using
>     it pretty simple in our code.
>
>     Bennie.
>
>     -----Original Message-----
>     From: Adarsh Sharma [mailto:adarsh.sharma@orkash.com
>     <ma...@orkash.com>]
>     Sent: Tuesday, September 21, 2010 11:52 AM
>     To: hive-user@hadoop.apache.org <ma...@hadoop.apache.org>
>     Subject: Error while fetching Hive Metadata
>
>
>     Hi all,
>     Did anyone encounter with the  following error while fetching meta
>     data
>     of Hive.
>
>     10/09/21 15:18:26 INFO connection.DriverManagerConnectionProvider:
>     Using
>     Hibernate built-in connection pool (not for production use!)
>     10/09/21 15:18:26 INFO connection.DriverManagerConnectionProvider:
>     Hibernate connection pool size: 10
>     10/09/21 15:18:26 INFO connection.DriverManagerConnectionProvider:
>     autocommit mode: false
>     10/09/21 15:18:26 INFO connection.DriverManagerConnectionProvider:
>     using
>     driver: org.apache.hadoop.hive.jdbc.HiveDriver at URL:
>     jdbc:hive://192.168.0.173:10000/default
>     <http://192.168.0.173:10000/default>
>     10/09/21 15:18:26 INFO connection.DriverManagerConnectionProvider:
>     connection properties: {user=hadoop, password=****}
>     Hive history
>     file=/tmp/root/hive_job_log_root_201009211518_1489326085.txt
>     10/09/21 15:18:26 INFO exec.HiveHistory: Hive history
>     file=/tmp/root/hive_job_log_root_201009211518_1489326085.txt
>     10/09/21 15:18:26 WARN cfg.SettingsFactory: Could not obtain
>     connection
>     metadata
>     java.sql.SQLException: Method not supported
>        at
>     org.apache.hadoop.hive.jdbc.HiveConnection.getAutoCommit(HiveConnection.java:201)
>        at
>     org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
>        at
>     org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
>        at
>     org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1823)
>        at
>     org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1143)
>        at SelectClauseExample.main(SelectClauseExample.java:20)
>
>     I want to use Hive Metadata. can someone Please help me.
>     I use Hadoop-0.20.2 and Hive 0.7 trunk
>
>     Thanks
>
>
Hi Carl,

Thanks for your reply, we are only looking for select queries to execute 
through Hibernate

So, Is it possible to connect Hive though Hibernate and perform some 
select operations from Hibernate or not ?

Looking forward for U'r reply.

Thanks & Regards
Adarsh Sharma

Re: Error while fetching Hive Metadata

Posted by Carl Steinbach <ca...@cloudera.com>.
>
>
>>  Hi Carl,
>
> Thanks for your reply, we are only looking for select queries to execute
> through Hibernate
>
> So, Is it possible to connect Hive though Hibernate and perform some select
> operations from Hibernate or not ?
>
> Looking forward for U'r reply.
>


No, it's not possible. If you want a second opinion I recommend getting in
touch with the Hibernate folks directly. They are probably in a better
position to say which RDBMSs are capable of supporting Hibernate.

Thanks.

Carl