-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.hms.yml
More file actions
48 lines (47 loc) · 2.1 KB
/
Copy pathdocker-compose.hms.yml
File metadata and controls
48 lines (47 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# docker-compose.hms.yml — Hive Metastore stack for live HMS catalog tests.
#
# Single container. Uses Hive's bundled Derby in-process DB for the
# metastore catalog because the upstream apache/hive image doesn't ship
# a Postgres JDBC driver. Derby is in-memory + ephemeral, which is fine
# for a CI smoke test that only needs the Thrift surface to work.
#
# Usage:
# docker compose -f docker-compose.test.yml \
# -f docker-compose.hms.yml up -d
# cargo test -p sqe-catalog --features hms backends_integration -- \
# --ignored hms::
#
# Why apache/hive:standalone-metastore-4.1.0:
# The metastore-server-only image runs the Thrift service on port 9083
# without HiveServer2 / HDFS. Lighter than the full hive distribution.
# Tag form is `standalone-metastore-<version>` (apache publishes 4.1.0
# and 4.2.0; we pin 4.1.0 for stability).
services:
hive-metastore:
image: apache/hive:standalone-metastore-4.1.0
environment:
# The image's entrypoint runs `schematool` against whichever DB
# is configured. With no overrides it defaults to embedded Derby,
# which the image already has bundled. That's all we need for a
# Thrift smoke test.
SERVICE_NAME: metastore
DB_DRIVER: derby
# Local-filesystem warehouse. The upstream apache/hive image
# doesn't bundle the S3A JARs, so pointing at `s3a://...` makes
# HMS reject CREATE DATABASE with `ClassNotFoundException:
# org.apache.hadoop.fs.s3a.S3AFileSystem`. Our smoke test only
# needs HMS to accept a Thrift create_database; we use a local
# path inside the container as the warehouse to avoid pulling
# in S3 client wiring just for namespace round-trips.
SERVICE_OPTS: >-
-Dmetastore.warehouse.dir=file:///opt/hive/warehouse
ports:
- "19083:9083"
healthcheck:
# No HTTP endpoint; the server just listens on the Thrift port.
# `bash` ships in this image, used here to TCP-probe.
test: ["CMD-SHELL", "bash -c 'cat < /dev/tcp/localhost/9083 || exit 1'"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s