3
votes

is that possible to have tables that are shared in hive. I mean a user creates a hive table. Later multiple users can work on that same table simultaneously.

I heard about derby and individual metastore for each users. But individual metastore option does not allow users to work simultaneously on same set of tables right?

Is there any other way to work on this?

Because when we try to access hive at the same time, we get the following error-

Caused by: ERROR XSDB6: Another instance of Derby may have already booted the da tabase /root/metastore_db.

3
use mysql as metastore DB , refer the link stackoverflow.com/questions/14343948/…vijay kumar

3 Answers

4
votes

ERROR XSDB6: Another instance of Derby may have already booted the da tabase /root/metastore_db.

This error can occur when you are trying to start more than one instance of hive shell. The lock may sustain in background (due to improper disconnection) even after closing tab/terminal.

Solution is to find the process using grep

ps aux | grep hive

Now, kill the process using,

kill -9 hive_process_id (ex: kill -9 21765)

Restart the hive shell. It works fine.

1
votes

I use Ubuntu and this error occurred when i opened hive from same location in two separate terminal windows. This would be interpreted as multiple users by the system. Close one of the terminal windows/tabs and that should do the trick.

0
votes

This occurs when running two instances of a spark application (eg: spark-shell, spark-sql, or start-thriftserver) started in the same directory using the embedded Derby metastore.

When not configured by the hive-site.xml, the Spark context automatically creates metastore_db in the current directory (see Spark docs). To avoid this, start the second spark application in a different directory or use a persistent metastore (eg: Hive Derby in Server Mode) and configure it via hive-site.xml.