Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - Re: show tables in bin does not display the tables


+
Sai Sai 2013-03-05, 11:48
Copy link to this message
-
Re: show tables in bin does not display the tables
Mark Grover 2013-03-05, 18:28
Sai,
This is because you are using the default embedded derby database as
metastore. When using the embedded derby metastore, the metadata is
stored in a relative location.

See the value of javax.jdo.option.ConnectionURL. By default, its value
is jdbc:derby:;databaseName=metastore_db;create=true
metastore_db is the directory that gets created to store the metadata.
If you put an absolute path there instead, e.g.
jdbc:derby:;databaseName=/a/path/that/exists/metastore_db;create=true
that would ensure that the same metadata is shared.

I, however, would recommend moving away from embedded derby metastore
and use MySQL or PostgreSQL for metastore instead. Googling should
give you some nice articles on how to do that.

Mark
On Tue, Mar 5, 2013 at 3:48 AM, Sai Sai <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have noticed when i execute the following command from hive shell in diff
> folders it behaves in diff ways and was wondering if this is right:
>
> show tables;
>
> from the bin folder under my hive install folder it just shows tab_name:
> ****************************
> myUser@ubuntu:~/work/hive-0.10.0-bin/bin$ ./hive
>
> hive> show tables;
>
> OK
> tab_name
> Time taken: 5.268 seconds
> ****************************
>
> But when i excecute the same command from my install folder:
>
> ****************************
> myUser@ubuntu:~/work/hive-0.10.0-bin/bin$ cd ..
>
> hive> show tables;
>
> OK
> tab_name
> employees
> sample_pages
> Time taken: 13.547 seconds
> ****************************
>
> Please let me know.
> Thanks
> Sai