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 <bsc...@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.sha...@orkash.com] > Sent: Tuesday, September 21, 2010 11:52 AM > To: hive-user@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 > 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 >