Database Reference
In-Depth Information
com.mysql.jdbc.Driver . (The username and password should be set too, of
course.) The JDBC driver JAR file for MySQL (Connector/J) must be on Hive's
classpath, which is simply achieved by placing it in Hive's lib directory.
Going a step further, there's another metastore configuration called a remote metastore ,
where one or more metastore servers run in separate processes to the Hive service. This
brings better manageability and security because the database tier can be completely fire-
walled off, and the clients no longer need the database credentials.
A Hive service is configured to use a remote metastore by setting
hive.metastore.uris to the metastore server URI(s), separated by commas if there
is more than one. Metastore server URIs are of the form thrift:// host : port ,
where the port corresponds to the one set by METASTORE_PORT when starting the
metastore server (see Hive Services ) .
Table 17-1. Important metastore configuration properties
Property name
Type
Default value
Description
URI
The directory relative to
fs.defaultFS where managed
tables are stored.
hive.metastore .
warehouse.dir
/user/hive/ ware-
house
hive.metastore.uris Comma-
separated
URIs
Not set
If not set (the default), use an in-pro-
cess metastore; otherwise, connect to
one or more remote metastores, speci-
fied by a list of URIs. Clients connect
in a round-robin fashion when there
are multiple remote servers.
URI
The JDBC URL of the metastore data-
base.
javax.jdo.option.
ConnectionURL
jdbc:derby:;database
Name=metastore_db;
create=true
The JDBC driver classname.
javax.jdo.option.
ConnectionDriverName
String org.apache.derby.
jdbc.EmbeddedDriver
The JDBC username.
javax.jdo.option.
ConnectionUserName
String APP
The JDBC password.
javax.jdo.option.
ConnectionPassword
String mine
Search WWH ::




Custom Search