Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions packaging/src/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ services:
- hive-db:/var/lib/postgresql
networks:
- hive
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hive -d metastore_db"]
interval: 5s
timeout: 3s
retries: 30

metastore:
image: apache/hive:${HIVE_VERSION}
depends_on:
- postgres
postgres:
condition: service_healthy
restart: unless-stopped
container_name: metastore
hostname: metastore
Expand Down Expand Up @@ -67,11 +73,18 @@ services:
- ./jars:/tmp/ext-jars:ro
networks:
- hive
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/9083'"]
interval: 5s
timeout: 5s
retries: 30
start_period: 30s

hiveserver2:
image: apache/hive:${HIVE_VERSION}
depends_on:
- metastore
metastore:
condition: service_healthy
restart: unless-stopped
container_name: hiveserver2
hostname: hiveserver2
Expand Down Expand Up @@ -125,6 +138,12 @@ services:
- ./jars:/tmp/ext-jars:ro
networks:
- hive
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/10000'"]
interval: 10s
timeout: 10s
retries: 30
start_period: 40s

zookeeper:
profiles:
Expand All @@ -141,6 +160,11 @@ services:
- zookeeper_data:/data
- zookeeper_datalog:/datalog
- zookeeper_logs:/logs
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo ruok > /dev/tcp/localhost/2181'"]
interval: 5s
timeout: 3s
retries: 30

tezam:
profiles:
Expand All @@ -149,7 +173,8 @@ services:
container_name: tezam
hostname: tezam
depends_on:
- zookeeper
zookeeper:
condition: service_healthy
restart: on-failure:3
environment:
USER: hive
Expand Down Expand Up @@ -177,7 +202,8 @@ services:
- llap
image: apache/hive:${HIVE_VERSION}
depends_on:
- zookeeper
zookeeper:
condition: service_healthy
restart: unless-stopped
environment:
USER: hive
Expand Down Expand Up @@ -205,6 +231,12 @@ services:
- scratch:/opt/hive/scratch
networks:
- hive
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/15001'"]
interval: 5s
timeout: 5s
retries: 30
start_period: 20s

volumes:
hive-db:
Expand Down
4 changes: 3 additions & 1 deletion packaging/src/docker/start-hive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ export COMPOSE_FILE="$COMPOSE_FILES"

echo "Starting Hive cluster (mode=$HIVE_EXECUTION_MODE)"

docker compose $PROFILE up -d $SCALE
docker compose $PROFILE up -d --wait $SCALE

echo "Hive cluster is ready."
Loading