forked from bitsondatadev/hive-metastore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change dbtype to postgres and upgrade log4j to 2.17.0
- Loading branch information
1 parent
573a3de
commit 112ce99
Showing
2 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/bin/sh | ||
|
||
export HADOOP_HOME=/opt/hadoop-3.2.0 | ||
export HADOOP_CLASSPATH=${HADOOP_HOME}/share/hadoop/tools/lib/aws-java-sdk-bundle-1.11.375.jar:${HADOOP_HOME}/share/hadoop/tools/lib/hadoop-aws-3.2.0.jar | ||
export HIVE_HOME=/opt/apache-hive-metastore-3.0.0-bin | ||
export LOG4J_VERSION=2.17.0 | ||
export HADOOP_CLASSPATH=${HADOOP_HOME}/share/hadoop/tools/lib/aws-java-sdk-bundle-1.11.375.jar:${HADOOP_HOME}/share/hadoop/tools/lib/hadoop-aws-3.2.0.jar:${HIVE_HOME}/lib/log4j-core-${LOG4J_VERSION}.jar:${HIVE_HOME}/lib/log4j-api-${LOG4J_VERSION}.jar:${HIVE_HOME}/lib/log4j-1.2-api-${LOG4J_VERSION}.jar:${HIVE_HOME}/lib/log4j-slf4j-impl-${LOG4J_VERSION}.jar | ||
export JAVA_HOME=/usr/local/openjdk-8 | ||
export METASTORE_DB_HOSTNAME=${METASTORE_DB_HOSTNAME:-localhost} | ||
|
||
echo "Waiting for database on ${METASTORE_DB_HOSTNAME} to launch on 3306 ..." | ||
echo "Waiting for database on postgres to launch on 5432 ..." | ||
|
||
while ! nc -z ${METASTORE_DB_HOSTNAME} 3306; do | ||
while ! nc -z postgres 5432; do | ||
sleep 1 | ||
done | ||
|
||
echo "Database on ${METASTORE_DB_HOSTNAME}:3306 started" | ||
echo "Init apache hive metastore on ${METASTORE_DB_HOSTNAME}:3306" | ||
echo "Database on postgres:5432 started" | ||
echo "Init apache hive metastore on postgres:5432" | ||
|
||
/opt/apache-hive-metastore-3.0.0-bin/bin/schematool -initSchema -dbType mysql | ||
/opt/apache-hive-metastore-3.0.0-bin/bin/start-metastore | ||
${HIVE_HOME}/bin/schematool -initSchema -dbType postgres | ||
${HIVE_HOME}/bin/start-metastore |