Folder metastore_db
is created in any directory where I run Hive query. Is there any way to have only one metastore_db
in a defined location and stop it from being created all over the places? Does it have anything to do with hive.metastore.local
?
相关问题
-
hive: cast array
> into map - Find function in HIVE
- Hive Tez reducers are running super slow
- Set parquet snappy output file size is hive?
- Hive 'cannot alter table' error
相关文章
- 在hive sql里怎么把"2020-10-26T08:41:19.000Z"这个字符串转换成年月日
- SQL query Frequency Distribution matrix for produc
- Cloudera 5.6: Parquet does not support date. See H
- converting to timestamp with time zone failed on A
- Hive error: parseexception missing EOF
- ClassNotFoundException: org.apache.spark.SparkConf
- How to get previous day date in Hive
- Hive's hour() function returns 12 hour clock v
The property of interest here is
javax.jdo.option.ConnectionURL
. The default value of this property isjdbc:derby:;databaseName=metastore_db;create=true
. This value specifies that you will be using embedded derby as your Hive metastore and the location of the metastore ismetastore_db
. Also the metastore will be created if it doesn't already exist.Note that the location of the metastore (
metastore_db
) is a relative path. Therefore, it gets created where you launch Hive from. If you update this property (in your hive-site.xml) to be, say an absolute path to a location, the metastore will be used from that location.I must warn you though that embedded derby metastore can only be accessed by one user at a time. Hive uses embedded derby by default to allow an out of the box experience and for ease of testing. For any practical system, I would recommend moving to standalone "real" database like MySQL or PostgreSQL. Instructions on how to do that are available here.
Since you use Embedded derby mode. To use single metastore_db location. you need to change following properties.
I hope this will help you. For more details click here