Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add database names for config values, minor edits, remove nonexistent config variables

Hive Metastore Administration

Table of Contents

Introduction

...

Variable Name

Description

Default Value

hive.metastore.metadb.dir

 

 

hive.metastore.usefilestore

 

 

rawstore.impl

(Hive 0.8.1 and later.)hive.metastore.rawstore.impl

 

 

org.jpox.autoCreateSchema

Creates necessary schema on startup if one doesn't exist. (e.g. tables, columns...) Set to false after creating it once.

 

org.jpox.fixedDatastore

Whether the datastore schema is fixed.

 

datanucleus.autoStartMechanism

Whether to initialize on startup.

 

hive.metastore.checkForDefaultDb

 

 

hive.metastore.ds.connection.url.hook

Name of the hook to use for retriving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used as the connection URL. (Hive 0.6 and later.)

 

hive.metastore.ds.retry.attempts

The number of times to retry a call to the backing datastore if there were a connection error. (Hive 0.6 and later; deprecated in Hive 0.13.0 – use hive.hmshandler.retry.attempts instead.)

1

hive.metastore.ds.retry.interval

The number of miliseconds between datastore retry attempts. (Hive 0.6 and later; deprecated in Hive 0.13.0 – use hive.hmshandler.retry.interval instead.)

1000

hive.metastore.server.min.threads

Minimum number of worker threads in the Thrift server's pool. (Hive 0.6 and later.)

200

hive.metastore.server.max.threads

Maximum number of worker threads in the Thrift server's pool. (Hive 0.6 and later.)

100000 since Hive 0.8.110000

 

Warning
titleConfiguring datanucleus.autoStartMechanism is highly recommended

Configuring auto start for data nucleus is highly recommended. See HIVE-4762 for more details.

Code Block
 <property>
    <name>datanucleus.autoStartMechanism</name>
    <value>SchemaTable</value>
  </property>

...

Config Param

Config Value

Comment

javax.jdo.option.ConnectionURL

jdbc:derby:;databaseName=
../build/test/junit_metastore_db;create=true

Derby database located at hive/trunk/build...

javax.jdo.option.ConnectionDriverName

org.apache.derby.jdbc.EmbeddedDriver

Derby embeded JDBC driver class

hive.metastore.uris

not needed since this is a local metastore

 

hive.metastore.local

true

embeded is local

hive.metastore.warehouse.dir

file://${user.dir}/../build/ql/test/data/warehouse

unit test data goes in here on your local filesystem

...

In local metastore setup, each Hive Client will open a connection to the datastore and make SQL queries against it. The following config configuration will set up a metastore in a MySQL server. Make sure that the server is accessible from the machines where Hive queries are executed since this is a local store. Also make sure the jdbc JDBC client library is in the classpath of Hive Client.

...

No Format
hive --service metastore -p <port_num>

Supported

...

Backend Databases for

...

Metastore

DatabaseMinimum Supported VersionName for Parameter Values
MySQL5.6.17mysql
Postgres9.1.13
postgres
Oracle11goracle
MS SQL Server2008 R2

...

mssql

Metastore Schema Consistency and Upgrades

...