Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#588] No need to start Yarn in gravitino docker container (#866)

Xun Liu6108e35f3839
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
index 5244e7116f..cd6e206e2d 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -47,7 +47,7 @@ jobs:
- name: Run AMD64 container
run: |
- docker run --rm --name ${DOCKER_RUN_NAME} --platform ${PLATFORM} -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 ${HIVE_IMAGE_NAME}:${HIVE_IMAGE_TAG_NAME}
+ docker run --rm --name ${DOCKER_RUN_NAME} --platform ${PLATFORM} -d -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 ${HIVE_IMAGE_NAME}:${HIVE_IMAGE_TAG_NAME}
docker ps -a
- name: Setup Gradle
diff --git a/dev/docker/README.md b/dev/docker/README.md
index 81660e924c..a67bf57ce3 100644
--- a/dev/docker/README.md
+++ b/dev/docker/README.md
@@ -32,7 +32,7 @@ docker run --rm -d -p 8090:8090 datastrato/gravitino
### Container startup commands
```
-docker run --rm -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50070:50070 -p 50075:50075 -p 50010:50010 datastrato/gravitino-ci-hive
+docker run --rm -d -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 datastrato/gravitino-ci-hive
```
### 0.1.0
@@ -73,6 +73,12 @@ docker run --rm -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10
### 0.1.5
- Rollback `Map container hostname to 127.0.0.1 before starting Hadoop` of `datastrato/gravitino-ci-hive:0.1.4`
+### 0.1.6
+- No start YARN when container startup
+- Removed expose ports:
+ - `22` SSH
+ - `8088` YARN Service
+
## Gravitino CI Trino
### Container startup commands
diff --git a/dev/docker/hive/Dockerfile b/dev/docker/hive/Dockerfile
index 4b0929f959..97a99fc121 100644
--- a/dev/docker/hive/Dockerfile
+++ b/dev/docker/hive/Dockerfile
@@ -155,7 +155,7 @@ RUN rm -rf /tmp/packages
################################################################################
# expose port
-EXPOSE 22 3306 8088 9000 9083 10000 10002 50070 50075 50010
+EXPOSE 3306 9000 9083 10000 10002 50070 50075 50010
################################################################################
# create startup script and set ENTRYPOINT
diff --git a/dev/docker/hive/start.sh b/dev/docker/hive/start.sh
index 8f9357c478..f6e8b9be53 100644
--- a/dev/docker/hive/start.sh
+++ b/dev/docker/hive/start.sh
@@ -9,8 +9,8 @@ service ssh start
ssh-keyscan localhost > /root/.ssh/known_hosts
ssh-keyscan 0.0.0.0 >> /root/.ssh/known_hosts
-# start hadoop
-${HADOOP_HOME}/sbin/start-all.sh
+# start hdfs
+${HADOOP_HOME}/sbin/start-dfs.sh
${HADOOP_HOME}/bin/hdfs dfs -mkdir /tmp
${HADOOP_HOME}/bin/hdfs dfs -chmod 1777 /tmp
diff --git a/docs/integration-test.md b/docs/integration-test.md
index 0a798d191b..4dcca41cd2 100644
--- a/docs/integration-test.md
+++ b/docs/integration-test.md
@@ -90,12 +90,12 @@ Before running the tests, make sure Docker is installed.
#### Running Gravitino Hive CI Docker Environment
-1. Run a hive docker test environment container locally using the `docker run --rm -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 datastrato/gravitino-ci-hive:0.1.4` command.
+1. Run a hive docker test environment container locally using the `docker run --rm -d -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 datastrato/gravitino-ci-hive:0.1.4` command.
The Gravitino server and Docker runtime environments will also use certain ports. Ensure that these ports are not already in use:
- Gravitino server: Port `8090`
-- Hive Docker runtime environment: Ports are `22`, `7180`, `8088`, `8888`, `9000`, `9083`, `10000`, `10002`, `50010`, `50070`, and `50075`
+- Hive Docker runtime environment: Ports are `9000`, `9083`, `10000`, `10002`, `50010`, `50070`, and `50075`
## Debugging Gravitino Server and Integration Tests
diff --git a/integration-test/build.gradle.kts b/integration-test/build.gradle.kts
index 52f52e6b7b..31d72ee37d 100644
--- a/integration-test/build.gradle.kts
+++ b/integration-test/build.gradle.kts
@@ -241,7 +241,7 @@ tasks.test {
environment("TRINO_CONF_DIR", buildDir.path + "/trino-conf")
// Gravitino CI Docker image
- environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.5")
+ environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.6")
environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "datastrato/gravitino-ci-trino:0.1.0")
val testMode = project.properties["testMode"] as? String ?: "embedded"
diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/BaseContainer.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/BaseContainer.java
index c7b0b0a26e..ec71bdc00b 100644
--- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/BaseContainer.java
+++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/BaseContainer.java
@@ -28,7 +28,6 @@ import org.testcontainers.containers.Network;
import org.testcontainers.containers.output.OutputFrame;
import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy;
import org.testcontainers.containers.wait.strategy.Wait;
-import org.testcontainers.images.PullPolicy;
/**
* The BaseContainer is the base for all containers. It's contains the common methods and settings
@@ -89,7 +88,6 @@ public abstract class BaseContainer implements AutoCloseable {
.withCreateContainerCmdModifier(c -> c.withHostName(hostName))
.withStartupCheckStrategy(new IsRunningStartupCheckStrategy())
.waitingFor(Wait.forListeningPort())
- .withImagePullPolicy(PullPolicy.alwaysPull())
.withStartupTimeout(Duration.ofMinutes(5));
network.ifPresent(net -> container.withNetwork(net).withNetworkAliases(hostName));
}
diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/HiveContainer.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/HiveContainer.java
index ba4935bc4c..f38ce45b3d 100644
--- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/HiveContainer.java
+++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/util/HiveContainer.java
@@ -22,7 +22,6 @@ public class HiveContainer extends BaseContainer {
public static final String DEFAULT_IMAGE = System.getenv("GRAVITINO_CI_HIVE_DOCKER_IMAGE");
public static final String HOST_NAME = "gravitino-ci-hive";
private static final int MYSQL_PORT = 3306;
- private static final int YARN_SERVICE_PORT = 8088;
private static final int HDFS_DEFAULTFS_PORT = 9000;
public static final int HIVE_METASTORE_PORT = 9083;
private static final int HIVESERVER2_PORT = 10000;
@@ -96,7 +95,6 @@ public class HiveContainer extends BaseContainer {
this.exposePorts =
ImmutableSet.of(
MYSQL_PORT,
- YARN_SERVICE_PORT,
HDFS_DEFAULTFS_PORT,
HIVE_METASTORE_PORT,
HIVESERVER2_PORT,