Skip to content

Commit

Permalink
feature: add hive metastore service
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Mar 7, 2024
1 parent e585fd8 commit cf6fbae
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<flink.shaded.jackson.version>2.15.3-18.0</flink.shaded.jackson.version>
<flink.shaded.guava.version>32.1.3-jre-18.0</flink.shaded.guava.version>
<org.projectlombok.version>1.18.30</org.projectlombok.version>
<milky.version>1.0.7</milky.version>
<milky.version>1.0.12</milky.version>
<mybatis.plus.version>3.5.4</mybatis.plus.version>
<hikaricp.version>5.0.1</hikaricp.version>
<mysql.version>8.2.0</mysql.version>
Expand Down
Binary file added tools/docker/hive/mysql-connector-j-8.2.0.jar
Binary file not shown.
26 changes: 25 additions & 1 deletion tools/docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,37 @@ services:
- MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password
- MYSQL_DATABASE=sakura
ports:
- 3380:3306
- 3306:3306
healthcheck:
test: [ "CMD", "mysqladmin", "-u$$MYSQL_ROOT_USER", "-p$$MYSQL_ROOT_PASSWORD", "ping", "-h", "localhost" ]
interval: 3s
timeout: 1s
retries: 16
start_period: 30s
volumes:
- ../mysql/my_custom.cnf:/opt/bitnami/mysql/conf/my_custom.cnf
- ../mysql/init.d:/docker-entrypoint-initdb.d
networks:
- sakura

metastore:
image: apache/hive:3.1.3
container_name: metastore
depends_on:
mysql:
condition: service_healthy
environment:
- SERVICE_NAME=metastore
- DB_DRIVER=mysql
- SERVICE_OPTS=-Djavax.jdo.option.ConnectionDriverName=com.mysql.cj.jdbc.Driver -Djavax.jdo.option.ConnectionURL=jdbc:mysql://mysql:3306/hive_metastore?createDatabaseIfNotExist=true&useSSL=false -Djavax.jdo.option.ConnectionUserName=root -Djavax.jdo.option.ConnectionPassword=123456
ports:
- 9083:9083
volumes:
- ../hive/mysql-connector-j-8.2.0.jar:/opt/hive/lib/mysql.jar
restart: unless-stopped
networks:
- sakura

networks:
sakura:
driver: bridge

0 comments on commit cf6fbae

Please sign in to comment.