Hive supports access to open source MySQL and Postgres metabases.
The node where the database is installed must be in the same network segment as the cluster, so that they can access each other.
Run the following command in Postgres or MySQL:
create database databasename;
In the preceding command, databasename indicates the database name.
Run the following command to import the SQL file to Postgres:
./bin/psql -U username -d databasename -f hive-schema-3.1.0.postgres.sql
Specifically:
./bin/psql is in the Postgres installation directory.
username indicates the username for logging in to Postgres.
databasename indicates the database name.
Run the following command to import the SQL file to the MySQL database:
./bin/mysql -u username -ppassword -Ddatabasename<hive-schema-3.1.0.mysql.sql
Specifically:
./bin/mysql is in the MySQL installation directory.
username indicates the user name for logging in to MySQL.
databasename indicates the database name.
Parameter |
Default Value |
Description |
---|---|---|
javax.jdo.option.ConnectionDriverName |
org.postgresql.Driver |
Driver class for connecting metadata on MetaStore |
javax.jdo.option.ConnectionURL |
jdbc:postgresql://%{DBSERVICE_FLOAT_IP}%{DBServer}:%{DBSERVICE_CPORT}/hivemeta?socketTimeout=60 |
URL of the JDBC link of the MetaStore metadata |
javax.jdo.option.ConnectionUserName |
hive${SERVICE_INDEX}${SERVICE_INDEX} |
Username for connecting to the metadata database on Metastore |
Parameter |
Default Value |
Description |
---|---|---|
javax.jdo.option.extend.ConnectionPassword |
****** |
User password for connecting to the external metadata database on Metastore. The password is encrypted in the background. |
chmod 755 /opt/Bigdata/tmp