Skip to content

Commit

Permalink
[#2379] fix(hive-ci-image): Let user hive be able to access MySQL (#2523
Browse files Browse the repository at this point in the history
)

### What changes were proposed in this pull request?

Let user hive be able to access MySQL in gravitino-ci-hive container.

### Why are the changes needed?

Fix: #2379 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

existing tests
  • Loading branch information
charliecheng630 authored Mar 14, 2024
1 parent 85e5e1a commit 83e0e6b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ tasks.test {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.8")
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.9")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
Expand Down
2 changes: 1 addition & 1 deletion catalogs/catalog-hive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ tasks.test {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.8")
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.9")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
Expand Down
2 changes: 1 addition & 1 deletion catalogs/catalog-lakehouse-iceberg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ tasks.test {
dependsOn(tasks.jar)

doFirst {
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.8")
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.9")
}

val init = project.extra.get("initIntegrationTest") as (Test) -> Unit
Expand Down
8 changes: 4 additions & 4 deletions dev/docker/hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install --fix-missing -yq \
openssh-server \
wget \
sudo \
openjdk-8-jdk \
mysql-server \
&& rm -rf /var/lib/apt/lists/*
openjdk-8-jdk

#################################################################################
## setup ssh
Expand Down Expand Up @@ -125,6 +123,7 @@ ADD hive-site.xml ${HIVE_HOME}/conf/hive-site.xml
ENV MYSQL_PWD=ds123
RUN echo "mysql-server mysql-server/root_password password ${MYSQL_PWD}" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password ${MYSQL_PWD}" | debconf-set-selections
RUN apt-get install -y mysql-server

RUN chown -R mysql:mysql /var/lib/mysql
RUN usermod -d /var/lib/mysql/ mysql
Expand All @@ -150,8 +149,9 @@ RUN mkdir /home/datastrato
RUN chown -R datastrato:hadoop /home/datastrato

################################################################################
# removed install packages
# removed install packages and cache
RUN rm -rf /tmp/packages
RUN rm -rf /var/lib/apt/lists/*

################################################################################
# expose port
Expand Down
3 changes: 3 additions & 0 deletions docs/docker-image-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ You can use this kind of image to test the catalog of Apache Hive.

Changelog

- gravitino-ci-hive:0.1.9
- Remove cache after installing packages.

- gravitino-ci-hive:0.1.8
- Change the value of `hive.server2.enable.doAs` to `true`

Expand Down
2 changes: 1 addition & 1 deletion integration-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ tasks.test {

doFirst {
// Gravitino CI Docker image
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.8")
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.9")
environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "datastrato/gravitino-ci-trino:0.1.5")

copy {
Expand Down
2 changes: 1 addition & 1 deletion integration-test/trino-it/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: '3.0'
services:

hive:
image: datastrato/gravitino-ci-hive:0.1.8
image: datastrato/gravitino-ci-hive:0.1.9
networks:
- trino-net
container_name: trino-ci-hive
Expand Down

0 comments on commit 83e0e6b

Please sign in to comment.