Skip to content

Commit 88493b0

Browse files
committed
[KYUUBI #7295] Upgrade components of play ground to recent versions
### Why are the changes needed? Upgrade components of play ground to recent versions, in addition, Kyuubi and Spark switch to JDK 17, while other components like Hadoop and Hive, remamin using JDK 8. ### How was this patch tested? Tested locally by building images and run demo, the updated docker images will be available on DockerHub soon, reviewer can test it too. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #7295 from pan3793/playground. Closes #7295 43ba4f9 [Cheng Pan] chmod 0934689 [Cheng Pan] ca-certificates-java a4b643d [Cheng Pan] docs bb7de28 [Cheng Pan] docs be24b2a [Cheng Pan] nit 3e9bd68 [Cheng Pan] nit 30e0abc [Cheng Pan] docs 73a01e4 [Cheng Pan] fix 883d27c [Cheng Pan] playground Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent 5e23c32 commit 88493b0

12 files changed

+116
-23
lines changed

docker/playground/.env

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
AWS_JAVA_SDK_VERSION=1.12.367
1919
HADOOP_VERSION=3.3.6
2020
HIVE_VERSION=2.3.9
21-
ICEBERG_VERSION=1.6.1
22-
KYUUBI_VERSION=1.9.0
21+
ICEBERG_VERSION=1.10.1
22+
KYUUBI_VERSION=1.11.0
2323
KYUUBI_HADOOP_VERSION=3.3.6
2424
POSTGRES_VERSION=12
2525
POSTGRES_JDBC_VERSION=42.3.4
2626
SCALA_BINARY_VERSION=2.12
27-
SPARK_VERSION=3.4.4
28-
SPARK_BINARY_VERSION=3.4
27+
SPARK_VERSION=3.5.7
28+
SPARK_BINARY_VERSION=3.5
2929
SPARK_HADOOP_VERSION=3.3.4
3030
ZOOKEEPER_VERSION=3.6.3
31-
PROMETHEUS_VERSION=2.53.3
31+
PROMETHEUS_VERSION=2.53.5
3232
GRAFANA_VERSION=11.4.0

docker/playground/README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,35 @@ Playground
1010

1111
### Play
1212

13-
1. Connect using `beeline`
13+
1. Connect using `kyuubi-beeline`
1414

15-
`docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/tpcds/tiny'`;
15+
```
16+
docker exec -it kyuubi /opt/kyuubi/bin/kyuubi-beeline -u 'jdbc:kyuubi://0.0.0.0:10009/tpcds/tiny'
17+
```
1618

1719
2. Connect using DBeaver
1820

1921
Add a Kyuubi datasource with
2022

21-
- connection url `jdbc:hive2://0.0.0.0:10009/tpcds/tiny`
23+
- connection url `jdbc:kyuubi://0.0.0.0:10009/tpcds/tiny`
2224
- username: `anonymous`
2325
- password: `<empty>`
2426

2527
3. Use built-in dataset
2628

2729
Kyuubi supply some built-in dataset, after Kyuubi started, you can run the following command to load the different datasets:
2830

29-
- For loading TPC-DS tiny dataset to `spark_catalog.tpcds_tiny`, run `docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpcds-tiny.sql`
30-
- For loading TPC-H tiny dataset to `spark_catalog.tpch_tiny`, run `docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpch-tiny.sql`
31+
- For loading TPC-DS tiny dataset to `spark_catalog.tpcds_tiny`, run
32+
33+
```
34+
docker exec -it kyuubi /opt/kyuubi/bin/kyuubi-beeline -u 'jdbc:kyuubi://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpcds-tiny.sql
35+
```
36+
37+
- For loading TPC-H tiny dataset to `spark_catalog.tpch_tiny`, run
38+
39+
```
40+
docker exec -it kyuubi /opt/kyuubi/bin/kyuubi-beeline -u 'jdbc:kyuubi://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpch-tiny.sql
41+
```
3142

3243
### Access Service
3344

docker/playground/build-image.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
set -e
2121

22-
APACHE_MIRROR=${APACHE_MIRROR:-https://dlcdn.apache.org}
22+
APACHE_MIRROR=${APACHE_MIRROR:-https://archive.apache.org/dist}
2323
MAVEN_MIRROR=${MAVEN_MIRROR:-https://maven-central-asia.storage-download.googleapis.com/maven2}
2424
BUILD_CMD="docker build"
2525

@@ -44,7 +44,6 @@ ${BUILD_CMD} \
4444
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
4545
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
4646
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
47-
--build-arg AWS_JAVA_SDK_VERSION=${AWS_JAVA_SDK_VERSION} \
4847
--build-arg HADOOP_VERSION=${HADOOP_VERSION} \
4948
--file "${SELF_DIR}/image/kyuubi-playground-hadoop.Dockerfile" \
5049
--tag nekyuubi/kyuubi-playground-hadoop:${KYUUBI_VERSION} \

docker/playground/compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ services:
7575
- 9083
7676
volumes:
7777
- ./conf/core-site.xml:/etc/hadoop/conf/core-site.xml
78+
- ./conf/hadoop-env.sh:/etc/hadoop/conf/hadoop-env.sh
79+
- ./conf/hive-env.sh:/etc/hive/conf/hive-env.sh
7880
- ./conf/hive-site.xml:/etc/hive/conf/hive-site.xml
7981
depends_on:
8082
- postgres
@@ -89,9 +91,13 @@ services:
8991
- 10099:10099
9092
volumes:
9193
- ./conf/core-site.xml:/etc/hadoop/conf/core-site.xml
94+
- ./conf/hadoop-env.sh:/etc/hadoop/conf/hadoop-env.sh
95+
- ./conf/hive-env.sh:/etc/hive/conf/hive-env.sh
9296
- ./conf/hive-site.xml:/etc/hive/conf/hive-site.xml
9397
- ./conf/spark-defaults.conf:/etc/spark/conf/spark-defaults.conf
98+
- ./conf/spark-env.sh:/etc/spark/conf/spark-env.sh
9499
- ./conf/kyuubi-defaults.conf:/etc/kyuubi/conf/kyuubi-defaults.conf
100+
- ./conf/kyuubi-env.sh:/etc/kyuubi/conf/kyuubi-env.sh
95101
- ./conf/kyuubi-log4j2.xml:/etc/kyuubi/conf/log4j2.xml
96102
- ./script/load-dataset-tpcds-tiny.sql:/opt/load_data/load-dataset-tpcds-tiny.sql
97103
- ./script/load-dataset-tpch-tiny.sql:/opt/load_data/load-dataset-tpch-tiny.sql
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
export JAVA_HOME=$(update-java-alternatives --list | grep java-1.8.0-openjdk | awk '{print $NF}')

docker/playground/conf/hive-env.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
export JAVA_HOME=$(update-java-alternatives --list | grep java-1.8.0-openjdk | awk '{print $NF}')
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
export JAVA_HOME=$(update-java-alternatives --list | grep java-1.17.0-openjdk | awk '{print $NF}')
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
export JAVA_HOME=$(update-java-alternatives --list | grep java-1.17.0-openjdk | awk '{print $NF}')

docker/playground/image/kyuubi-playground-base.Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,25 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
FROM eclipse-temurin:8-focal
13+
FROM ubuntu:focal
14+
15+
ENV DEBIAN_FRONTEND=noninteractive
16+
ENV DEBCONF_TERSE=true
1417

1518
RUN set -x && \
19+
echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/10disableextras && \
20+
echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/10disableextras && \
1621
ln -snf /usr/bin/bash /usr/bin/sh && \
1722
apt-get update -q && \
18-
apt-get install -yq retry busybox && \
23+
apt-get install -yq \
24+
retry \
25+
busybox \
26+
ca-certificates-java \
27+
openjdk-8-jdk-headless \
28+
openjdk-17-jdk-headless && \
1929
rm -rf /var/lib/apt/lists/* && \
30+
update-ca-certificates -f && \
31+
update-java-alternatives --set $(update-java-alternatives --list | grep java-1.8.0-openjdk | awk '{print $NF}') || \
2032
mkdir /opt/busybox && \
2133
busybox --install /opt/busybox
2234

docker/playground/image/kyuubi-playground-hadoop.Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ARG KYUUBI_VERSION
1414

1515
FROM nekyuubi/kyuubi-playground-base:${KYUUBI_VERSION}
1616

17-
ARG AWS_JAVA_SDK_VERSION
1817
ARG HADOOP_VERSION
1918

2019
ARG APACHE_MIRROR
@@ -29,9 +28,7 @@ RUN set -x && \
2928
tar -xzf ${HADOOP_TAR_NAME}.tar.gz -C /opt && \
3029
ln -s /opt/hadoop-${HADOOP_VERSION} ${HADOOP_HOME} && \
3130
rm ${HADOOP_TAR_NAME}.tar.gz && \
32-
HADOOP_CLOUD_STORAGE_JAR_NAME=hadoop-cloud-storage && \
33-
wget -q ${MAVEN_MIRROR}/org/apache/hadoop/${HADOOP_CLOUD_STORAGE_JAR_NAME}/${HADOOP_VERSION}/${HADOOP_CLOUD_STORAGE_JAR_NAME}-${HADOOP_VERSION}.jar -P ${HADOOP_HOME}/share/hadoop/hdfs/lib && \
3431
HADOOP_AWS_JAR_NAME=hadoop-aws && \
35-
wget -q ${MAVEN_MIRROR}/org/apache/hadoop/${HADOOP_AWS_JAR_NAME}/${HADOOP_VERSION}/${HADOOP_AWS_JAR_NAME}-${HADOOP_VERSION}.jar -P ${HADOOP_HOME}/share/hadoop/hdfs/lib && \
32+
ln -s ${HADOOP_HOME}/share/hadoop/tools/lib/${HADOOP_AWS_JAR_NAME}-${HADOOP_VERSION}.jar ${HADOOP_HOME}/share/hadoop/hdfs/lib/ && \
3633
AWS_JAVA_SDK_BUNDLE_JAR_NAME=aws-java-sdk-bundle && \
37-
wget -q ${MAVEN_MIRROR}/com/amazonaws/${AWS_JAVA_SDK_BUNDLE_JAR_NAME}/${AWS_JAVA_SDK_VERSION}/${AWS_JAVA_SDK_BUNDLE_JAR_NAME}-${AWS_JAVA_SDK_VERSION}.jar -P ${HADOOP_HOME}/share/hadoop/hdfs/lib
34+
ln -s $(find ${HADOOP_HOME}/share/hadoop/tools/lib/ -name "${AWS_JAVA_SDK_BUNDLE_JAR_NAME}-*.jar") ${HADOOP_HOME}/share/hadoop/hdfs/lib/ \

0 commit comments

Comments
 (0)