FAQ
Dear all,
I have encountered a serious problem while fetching Hive metadata
through Eclipse.
I am able to connect Hive through JDBC program in Eclipse and also able
to fetch data from it.
But when I try to connect to Hive metadata I got the following error :-

Driver Loaded.
Hive history file=/tmp/root/hive_job_log_root_201009201158_301097049.txt
Sep 20, 2010 11:58:13 AM
org.apache.hadoop.hive.ql.session.SessionState$LogHelper printInfo
INFO: Hive history
file=/tmp/root/hive_job_log_root_201009201158_301097049.txt
Got Connection.
Exception in thread "main" java.sql.SQLException: Method not supported
at
org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getTables(HiveDatabaseMetaData.java:710)
at test.Jdbchivemetadata.main(Jdbchivemetadata.java:15)
I use
Hadoop = 0.20.2
Hive = 0.5 with Mysql As metastore

***My work for this error***
I think hive_jdbc.jar doesn't support these features to access metastore.
I see HiveDatabaseMetaData.java and it has all methods with exceptions
'Method Not Supported ';

Can anybody please tell me how to use Hive Metadata if it is possible.
The codes are attached with mail.

Thanks and Regards
Adarsh Sharma

Search Discussions

  • Bennie Schut at Sep 20, 2010 at 7:31 am
    Metadata calls have been added on trunk (0.7.0)
    I haven't used hive 0.5 myself but the jdbc part seems self contained enough you could perhaps use the one from trunk to connect to 0.5
    But I'm not sure if that was enough to get eclipse working, I only tried it on the Squirrel client and some custom code.

    -----Original Message-----
    From: Adarsh Sharma
    Sent: Monday, September 20, 2010 8:44 AM
    To: hive-user@hadoop.apache.org
    Subject: Error while fetching Hive Metadata

    Dear all,
    I have encountered a serious problem while fetching Hive metadata
    through Eclipse.
    I am able to connect Hive through JDBC program in Eclipse and also able
    to fetch data from it.
    But when I try to connect to Hive metadata I got the following error :-

    Driver Loaded.
    Hive history file=/tmp/root/hive_job_log_root_201009201158_301097049.txt
    Sep 20, 2010 11:58:13 AM
    org.apache.hadoop.hive.ql.session.SessionState$LogHelper printInfo
    INFO: Hive history
    file=/tmp/root/hive_job_log_root_201009201158_301097049.txt
    Got Connection.
    Exception in thread "main" java.sql.SQLException: Method not supported
    at
    org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getTables(HiveDatabaseMetaData.java:710)
    at test.Jdbchivemetadata.main(Jdbchivemetadata.java:15)
    I use
    Hadoop = 0.20.2
    Hive = 0.5 with Mysql As metastore

    ***My work for this error***
    I think hive_jdbc.jar doesn't support these features to access metastore.
    I see HiveDatabaseMetaData.java and it has all methods with exceptions
    'Method Not Supported ';

    Can anybody please tell me how to use Hive Metadata if it is possible.
    The codes are attached with mail.

    Thanks and Regards
    Adarsh Sharma
  • Adarsh Sharma at Sep 21, 2010 at 9:50 am
    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
  • Bennie Schut at Sep 21, 2010 at 10:19 am
    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
    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
  • Carl Steinbach at Sep 23, 2010 at 2:48 am
    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 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
    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
  • Adarsh Sharma at Nov 25, 2010 at 12:08 pm

    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 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
    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
    <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
  • Carl Steinbach at Nov 27, 2010 at 2:04 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedSep 20, '10 at 6:42a
activeNov 27, '10 at 2:04a
posts7
users3
websitehive.apache.org

People

Translate

site design / logo © 2022 Grokbase