Skip to content

Commit 7d8ffdb

Browse files
committed
single hive image
1 parent f49bbbc commit 7d8ffdb

6 files changed

Lines changed: 70 additions & 241 deletions

File tree

packaging/src/docker/Dockerfile-llap

Lines changed: 0 additions & 114 deletions
This file was deleted.

packaging/src/docker/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,18 @@ After building successfully, you get a Docker image named `apache/hive` by defau
8787

8888
##### Build LLAP Daemon image
8989

90-
To build a dedicated LLAP Daemon image (using `Dockerfile-llap` under the hood), invoke `build.sh` with the `-llap` flag. For example:
90+
To build the image used by LLAP Daemon (using the common `Dockerfile` and `entrypoint.sh` under the hood), invoke `build.sh`. For example:
9191

9292
```shell
93-
./build.sh -hive 4.2.0 -hadoop 3.4.1 -tez 0.10.5 -llap
93+
./build.sh -hive 4.2.0 -hadoop 3.4.1 -tez 0.10.5
9494
```
9595

9696
or, relying on versions from `pom.xml`:
9797

9898
```shell
99-
./build.sh -llap
99+
./build.sh
100100
```
101101

102-
When `-llap` is specified, an additional image is produced alongside `apache/hive:${HIVE_VERSION}`:
103-
104-
- `apache/hive-llap:${HIVE_VERSION}` (or `${repo}/hive-llap:${HIVE_VERSION}` if `-repo` is used).
105-
106102
#### Run services
107103

108104
Before going further, we should define the environment variable `HIVE_VERSION` first.
@@ -217,14 +213,14 @@ Use the following workflow from `packaging/src/docker`:
217213
docker-compose --profile llap -f docker-compose.yml down --rmi local # cleanup previous containers and images
218214

219215
export POSTGRES_LOCAL_PATH=... # set the path to the postgres driver jar on the host machine
220-
./build.sh -hive 4.2.0 -hadoop 3.4.1 -tez 0.10.5 -llap # build LLAP image: already described earlier
216+
./build.sh -hive 4.2.0 -hadoop 3.4.1 -tez 0.10.5 # build image from the common Dockerfile
221217
docker compose -f docker-compose.yml up -d
222218
```
223219

224220
To view LLAP logs:
225221

226222
```shell
227-
docker compose --profile llap -f docker-compose.yml logs -f llap
223+
docker compose --profile llap -f docker-compose.yml logs -f llapdaemon1 llapdaemon2
228224
```
229225

230226
To stop and remove the LLAP stack:

packaging/src/docker/build.sh

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ set -eux
2020
HIVE_VERSION=
2121
HADOOP_VERSION=
2222
TEZ_VERSION=
23-
BUILD_LLAP=false
2423
usage() {
2524
cat <<EOF 1>&2
26-
Usage: $0 [-h] [-hadoop <Hadoop version>] [-tez <Tez version>] [-hive <Hive version>] [-repo <Docker repo>] [-llap]
27-
Build the Hive Docker image (and optionally the LLAP Daemon image)
25+
Usage: $0 [-h] [-hadoop <Hadoop version>] [-tez <Tez version>] [-hive <Hive version>] [-repo <Docker repo>]
26+
Build the Hive Docker image (reused for LLAP too)
2827
-help Display help
2928
-hadoop Build image with the specified Hadoop version
3029
-tez Build image with the specified Tez version
3130
-hive Build image with the specified Hive version
3231
-repo Docker repository
33-
-llap Additionally build the LLAP Daemon image
3432
EOF
3533
}
3634

@@ -60,10 +58,6 @@ while [ $# -gt 0 ]; do
6058
REPO=$1
6159
shift
6260
;;
63-
-llap)
64-
BUILD_LLAP=true
65-
shift
66-
;;
6761
*)
6862
shift
6963
;;
@@ -137,16 +131,4 @@ docker build \
137131
--build-arg "HADOOP_VERSION=$HADOOP_VERSION" \
138132
--build-arg "TEZ_VERSION=$TEZ_VERSION"
139133

140-
if [ "$BUILD_LLAP" = true ]; then
141-
cp "$SOURCE_DIR/packaging/src/docker/entrypoint-llap.sh" "$WORK_DIR/"
142-
cp "$SOURCE_DIR/packaging/src/docker/Dockerfile-llap" "$WORK_DIR/"
143-
docker build \
144-
"$WORK_DIR" \
145-
-f "$WORK_DIR/Dockerfile-llap" \
146-
-t "$repo/hive-llap:$HIVE_VERSION" \
147-
--build-arg "HADOOP_VERSION=$HADOOP_VERSION" \
148-
--build-arg "HIVE_VERSION=$HIVE_VERSION" \
149-
--build-arg "TEZ_VERSION=$TEZ_VERSION"
150-
fi
151-
152134
rm -r "${WORK_DIR}"

packaging/src/docker/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,15 @@ services:
175175
llapdaemon1:
176176
profiles:
177177
- llap
178-
image: apache/hive-llap:${HIVE_VERSION}
178+
image: apache/hive:${HIVE_VERSION}
179179
container_name: llapdaemon1
180180
hostname: llapdaemon1
181181
depends_on:
182182
- zookeeper
183183
restart: unless-stopped
184184
environment:
185185
USER: hive
186+
SERVICE_NAME: 'llap'
186187
# Basic LLAP daemon configuration
187188
LLAP_MEMORY_MB: '1024'
188189
LLAP_EXECUTORS: '1'
@@ -211,14 +212,15 @@ services:
211212
llapdaemon2:
212213
profiles:
213214
- llap
214-
image: apache/hive-llap:${HIVE_VERSION}
215+
image: apache/hive:${HIVE_VERSION}
215216
container_name: llapdaemon2
216217
hostname: llapdaemon2
217218
depends_on:
218219
- zookeeper
219220
restart: unless-stopped
220221
environment:
221222
USER: hive
223+
SERVICE_NAME: 'llap'
222224
# Basic LLAP daemon configuration
223225
LLAP_MEMORY_MB: '1024'
224226
LLAP_EXECUTORS: '1'

packaging/src/docker/entrypoint-llap.sh

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)