This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 7381cd56b0ab8f2f87f22d231cae1281bb128f2a
Author: 苏小刚 <[email protected]>
AuthorDate: Tue May 28 22:47:45 2024 +0800

    [docker](hive) sync for hive initializing (#35479)
    
    Add healthy checking for hive2 and hive3
---
 docker/thirdparties/docker-compose/hive/hive-2x.yaml.tpl | 13 +++++++++++++
 docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/docker/thirdparties/docker-compose/hive/hive-2x.yaml.tpl 
b/docker/thirdparties/docker-compose/hive/hive-2x.yaml.tpl
index 388ea0fc04f..ca0fe2e9ddb 100644
--- a/docker/thirdparties/docker-compose/hive/hive-2x.yaml.tpl
+++ b/docker/thirdparties/docker-compose/hive/hive-2x.yaml.tpl
@@ -87,6 +87,11 @@ services:
       - ./scripts:/mnt/scripts
     depends_on:
       - hive-metastore-postgresql
+    healthcheck:
+      test: ["CMD", "sh", "-c", "/mnt/scripts/healthy_check.sh"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
     network_mode: "host"
 
   hive-metastore-postgresql:
@@ -99,3 +104,11 @@ services:
       interval: 5s
       timeout: 60s
       retries: 120
+
+  hive-hello-world:
+    image: hello-world
+    container_name: ${CONTAINER_UID}hive2-hello-world
+    depends_on:
+      hive-metastore:
+        condition: service_healthy
+    network_mode: "host"
diff --git a/docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl 
b/docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl
index c6d637b77e2..09d150c17b2 100644
--- a/docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl
+++ b/docker/thirdparties/docker-compose/hive/hive-3x.yaml.tpl
@@ -87,6 +87,11 @@ services:
       - ./scripts:/mnt/scripts
     depends_on:
       - hive-metastore-postgresql
+    healthcheck:
+      test: ["CMD", "sh", "-c", "/mnt/scripts/healthy_check.sh"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
     network_mode: "host"
 
   hive-metastore-postgresql:
@@ -99,3 +104,11 @@ services:
       interval: 5s
       timeout: 60s
       retries: 120
+
+  hive-hello-world:
+    image: hello-world
+    container_name: ${CONTAINER_UID}hive3-hello-world
+    depends_on:
+      hive-metastore:
+        condition: service_healthy
+    network_mode: "host"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to