You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/06/09 09:04:23 UTC
[airflow] 10/36: Hive/Hadoop minicluster needs JDK8 and JAVA_HOME
to work (#8938)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 519401bfe07ded42db5207b99124995037e7ff88
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Thu May 21 06:19:49 2020 +0100
Hive/Hadoop minicluster needs JDK8 and JAVA_HOME to work (#8938)
Debian Buster only ships with a JDK11, and Hive/Hadoop fails in odd,
hard to debug ways (complains about metastore not being initalized,
possibly related to the class loader issues.)
Until we rip Hive out from the CI (replacing it with Hadoop in a seprate
integration, only on for some builds) we'll have to stick with JRE8
Our previous approach of installing openjdk-8 from Sid/Unstable started
failing as Debian Sid has a new (and conflicting) version of GCC/libc.
The adoptopenjdk package archive is designed for Buster so should be
more resilient
(cherry picked from commit 8476c1e387bb98db3feb9f26247bcef6e92948ec)
---
Dockerfile.ci | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 7a76295..15f3732 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -119,11 +119,14 @@ RUN adduser airflow \
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
RUN mkdir -pv /usr/share/man/man1 \
&& mkdir -pv /usr/share/man/man7 \
+ && curl -fsSL https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - \
+ && echo 'deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main' > \
+ /etc/apt/sources.list.d/adoptopenjdk.list \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
gnupg \
libgcc-8-dev \
- default-jre-headless \
+ adoptopenjdk-8-hotspot-jre \
apt-transport-https \
bash-completion \
ca-certificates \
@@ -147,6 +150,8 @@ RUN mkdir -pv /usr/share/man/man1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
+ENV JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-jre-amd64
+
# Install Hadoop and Hive
# It is done in one step to share variables.
ENV HADOOP_HOME="/opt/hadoop-cdh" HIVE_HOME="/opt/hive"