FAQ
Environment Info :

SLES10SP1, Hadoop 0.20.2, Hive 0.6.0

This is the scenario :

1. start hive shell from /root/tmp directory and create a table and quit out of hive.

2. start hive shell from /root directory, show tables does not show the created table, this new
table is not visible at all.

Can some of you please shed some light on this, is this by design.

Any help is greatly appreciated.

Thanks

-Muthu

Search Discussions

  • Pavan at Nov 13, 2010 at 1:40 pm
    The default hive configuration makes use of Derby, an embedded derby
    database, for storing metadata. This is usually metastore_db in your
    current directory from where hive is launched [configured via
    javax.jdo.option.ConnectionURL in conf/hive-site.xml]. In the default
    configuration, this metadata is only visible to one user at a time.

    If you change directories, it doesn't find metastore_db anymore and
    thus doesn't show up your tables.


    ~
    Pavan
    ** Sent from Mobile **


    On Sat, Nov 13, 2010 at 4:53 AM, M.R. Muthukumar wrote:
    Environment Info :

    SLES10SP1, Hadoop 0.20.2, Hive 0.6.0

    This is the scenario :

    1. start hive shell from /root/tmp directory and create a table and quit out of hive.

    2. start hive shell from /root directory, show tables does not show the created table, this new
    table is not visible at all.

    Can some of you please shed some light on this, is this by design.

    Any help is greatly appreciated.

    Thanks

    -Muthu




  • Marcello de Sales at Nov 14, 2010 at 3:16 am
    Based on the default hive configuration, different directories called
    metastore_db can be created in different locations... If you are prototyping
    and trying hive with your peers, it is even worse... Someone creates a
    table, others don't see it due to the fact that users are not using the same
    metastore_db file... Very annoying side-effect...

    You can specify the metastore_db path javax.jdo.option.ConnectionURL... More
    information at http://wiki.apache.org/hadoop/Hive/AdminManual/MetastoreAdmin

    I preferred to use MySQL as the metastore because it allows different users
    to use the CLI interface using the hadoop user through the config... More
    information at
    http://blog.milford.io/2010/06/installing-apache-hive-with-a-mysql-metastore-in-centos/

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

    <configuration>
    <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
    </property>
    <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
    </property>
    <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hadoop</value>
    </property>
    <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>hadoop</value>
    </property>
    </configuration>

    Before using this configuration, make sure to have installed mysql, created
    the user hadoop, granted permissions and started the server...

    thanks
    Marcello

    On Sat, Nov 13, 2010 at 5:40 AM, Pavan wrote:

    The default hive configuration makes use of Derby, an embedded derby
    database, for storing metadata. This is usually metastore_db in your
    current directory from where hive is launched [configured via
    javax.jdo.option.ConnectionURL in conf/hive-site.xml]. In the default
    configuration, this metadata is only visible to one user at a time.

    If you change directories, it doesn't find metastore_db anymore and
    thus doesn't show up your tables.


    ~
    Pavan
    ** Sent from Mobile **


    On Sat, Nov 13, 2010 at 4:53 AM, M.R. Muthukumar wrote:
    Environment Info :

    SLES10SP1, Hadoop 0.20.2, Hive 0.6.0

    This is the scenario :

    1. start hive shell from /root/tmp directory and create a table and quit
    out of hive.
    2. start hive shell from /root directory, show tables does not show the
    created table, this new
    table is not visible at all.

    Can some of you please shed some light on this, is this by design.

    Any help is greatly appreciated.

    Thanks

    -Muthu




Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedNov 12, '10 at 11:23p
activeNov 14, '10 at 3:16a
posts3
users3
websitehive.apache.org

People

Translate

site design / logo © 2022 Grokbase