Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In local/embedded metastore setup, the metastore server component is used like a library within the Hive Client. Each Hive Client will open a connection to the database and make SQL queries against it. Make sure that the database is accessible from the machines where Hive queries are executed since this is a local store. Also make sure the JDBC client library is in the classpath of Hive Client. This configuration is often used with HiveServer2 (to use embedded metastore only with HiveServer2 add "--hiveconf hive.metastore.uris=' '" in command line parameters of the hiveserver2 start command or use hiveserver2-site.xml (available in Hive 0.14)).

Config Param

Config Value

Comment

hive.metastore.uris

not needed because this is local store

 

hive.metastore.local

true

this is local store (removed in Hive 0.10, see configuration description section)

hive.metastore.warehouse.dir

<base hdfs path>

Points to default location for of non-external Hive tables in HDFS.

Remote Metastore Server

In remote metastore setup, all Hive Clients will make a connection to a metastore server which in turn queries the datastore (MySQL in this example) for metadata. Metastore server and client communicate using Thrift Protocol. Starting with Hive 0.5.0, you can start a Thrift server by executing the following command:

...

Config Param

Config Value

Comment

hive.metastore.uris

thrift://<host_name>:<port>

host and port for the Thrift metastore server

hive.metastore.local

false

This Metastore is local storeremote.  Note: This is no longer needed as of Hive 0.10.  Setting hive.metastore.uris uri is sufficient.

hive.metastore.warehouse.dir

<base hdfs path>

Points to default location for of non-external Hive tables in HDFS.

If you are using MySQL as the datastore for metadata, put MySQL jdbc libraries in HIVE_HOME/lib before starting Hive Client or HiveMetastore Server.

...