...
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 |
| this is local store (removed in Hive 0.10, see configuration description section) |
hive.metastore.warehouse.dir |
| 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 |
| host and port for the Thrift metastore server |
hive.metastore.local |
| 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 |
| 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.
...