From 4e177edc8b93311dc120dacd12c375ebe3046895 Mon Sep 17 00:00:00 2001 From: GuangJie1 Date: Thu, 21 Aug 2025 10:58:29 +0800 Subject: [PATCH 1/2] upgrade impala --- Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile | 71 +++++++++++++++++++ .../24.03-lts-sp2/patches/build_impala.patch | 28 ++++++++ Bigdata/impala/README.md | 8 ++- Bigdata/impala/doc/image-info.yml | 7 +- Bigdata/impala/meta.yml | 4 +- 5 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile create mode 100644 Bigdata/impala/4.5.0/24.03-lts-sp2/patches/build_impala.patch diff --git a/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile b/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile new file mode 100644 index 00000000..028ad85f --- /dev/null +++ b/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile @@ -0,0 +1,71 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp2 +FROM ${BASE} AS builder +ARG VERSION=4.5.0 +ARG TARGETARCH +ARG BUILDARCH +ARG OPENLDAP_ARGS + +RUN yum install -y java-1.8.0-openjdk-devel maven make gcc cyrus-sasl-devel krb5-devel \ + libxml2-devel libxslt-devel glibc-static g++ vim-common libdb-devel perl wget \ + git + +ARG LIBFFI_VERSION=3.0.13 +RUN wget https://github.com/libffi/libffi/archive/refs/tags/v${LIBFFI_VERSION}.tar.gz -O /tmp/v${LIBFFI_VERSION}.tar.gz && \ + cd /tmp && tar -xvf v${LIBFFI_VERSION}.tar.gz && \ + chmod +x /tmp/libffi-${LIBFFI_VERSION}/configure && \ + /tmp/libffi-${LIBFFI_VERSION}/configure ${LIBFFI_ARGS} --prefix=/usr/local && \ + make -j $(nproc) install && \ + ln -s /usr/local/lib64/libffi.so.6 /usr/lib64/libffi.so.6 && \ + rm -rf /tmp/* + +ARG OPENSSL_VERSION=1.1.1g +ARG OPENSSL_ROOT_DIR=/usr/local/openssl +RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O /tmp/openssl-${OPENSSL_VERSION}.tar.gz && \ + cd /tmp && tar -xvf openssl-${OPENSSL_VERSION}.tar.gz && \ + cd openssl-${OPENSSL_VERSION} && \ + ./config shared --openssldir=${OPENSSL_ROOT_DIR} --prefix=${OPENSSL_ROOT_DIR} && \ + make -j$(nproc) && make install && \ + ln -s ${OPENSSL_ROOT_DIR}/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1 && \ + ln -s ${OPENSSL_ROOT_DIR}/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1 && \ + rm -rf /tmp/* + +ARG OPENLDAP_VERSION=2.4.47 +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + OPENLDAP_ARGS=""; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + OPENLDAP_ARGS="--build=arm"; \ + fi; \ + wget https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-${OPENLDAP_VERSION}.tgz -O /tmp/openldap-${OPENLDAP_VERSION}.tgz && \ + cd /tmp && tar -xvf openldap-${OPENLDAP_VERSION}.tgz && \ + cd openldap-${OPENLDAP_VERSION} && \ + ./configure ${OPENLDAP_ARGS} --prefix=/usr/local/openldap-${OPENLDAP_VERSION} CFLAGS="-fPIC" CXXFLAGS="-fPIC" && \ + make -j$(nproc) depend && \ + make -j$(nproc) install && \ + rm -rf /tmp/* + +ARG PYTHON_VERSION=3.8.11 +COPY patches/build_impala.patch /opt/build_impala.patch +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x86_64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi; \ + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${BUILDARCH}.sh -O ~/miniconda.sh && \ + bash ~/miniconda.sh -b -p /usr/local/miniconda && rm -f ~/miniconda.sh && \ + /usr/local/miniconda/bin/conda init bash && \ + /usr/local/miniconda/bin/conda tos accept --channel https://repo.anaconda.com/pkgs/main && \ + /usr/local/miniconda/bin/conda create --name python_impala -y python=${PYTHON_VERSION} && \ + bash -c 'source /usr/local/miniconda/etc/profile.d/conda.sh && \ + conda activate python_impala && \ + cd /opt && \ + git clone -b $VERSION https://github.com/apache/impala.git && \ + cd impala && \ + git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn /opt/build_impala.patch && \ + sed -i -e "s/^ID=\"openEuler\"/ID=\"centos\"/" \ + -e "s/^VERSION_ID=\"24.03\"/VERSION_ID=\"8\"/" /etc/os-release && \ + ./buildall.sh -notests -release -noclean && \ + sed -i -e "s/^ID=\"centos\"/ID=\"openEuler\"/" \ + -e "s/^VERSION_ID=\"8\"/VERSION_ID=\"24.03\"/" /etc/os-release && \ + conda deactivate && \ + /usr/local/miniconda/_conda constructor uninstall --prefix /usr/local/miniconda' && \ + rm -rf /tmp/* \ No newline at end of file diff --git a/Bigdata/impala/4.5.0/24.03-lts-sp2/patches/build_impala.patch b/Bigdata/impala/4.5.0/24.03-lts-sp2/patches/build_impala.patch new file mode 100644 index 00000000..348cc400 --- /dev/null +++ b/Bigdata/impala/4.5.0/24.03-lts-sp2/patches/build_impala.patch @@ -0,0 +1,28 @@ +diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py +index 593744abd..275e477cd 100755 +--- a/bin/bootstrap_toolchain.py ++++ b/bin/bootstrap_toolchain.py +@@ -475,7 +475,7 @@ def get_toolchain_downloads(): + ["avro", "binutils", "boost", "breakpad", "bzip2", "calloncehack", "cctz", + "cloudflarezlib", "cmake", "crcutil", "curl", "flatbuffers", "gdb", "gflags", + "glog", "gperftools", "jwt-cpp", "libev", "libunwind", "lz4", "mold", +- "openldap", "orc", "protobuf", "python", "rapidjson", "re2", "snappy", "tpc-h", ++ "orc", "protobuf", "python", "rapidjson", "re2", "snappy", "tpc-h", + "tpc-ds", "zlib", "zstd"]] + python3_package = ToolchainPackage( + "python", explicit_version=os.environ.get("IMPALA_PYTHON3_VERSION")) +diff --git a/buildall.sh b/buildall.sh +index bca291789..bd0406086 100755 +--- a/buildall.sh ++++ b/buildall.sh +@@ -442,6 +442,10 @@ bootstrap_dependencies() { + else + echo ">>> Downloading and extracting toolchain dependencies." + "$IMPALA_HOME/bin/bootstrap_toolchain.py" ++ rm -rf $IMPALA_HOME/toolchain/toolchain-packages-gcc$IMPALA_GCC_VERSION/binutils-$IMPALA_BINUTILS_VERSION/bin/ld ++ ln -s /usr/bin/ld $IMPALA_HOME/toolchain/toolchain-packages-gcc$IMPALA_GCC_VERSION/binutils-$IMPALA_BINUTILS_VERSION/bin/ld ++ mkdir -p $IMPALA_HOME/toolchain/toolchain-packages-gcc$IMPALA_GCC_VERSION/openldap-$IMPALA_OPENLDAP_VERSION/ ++ cp -rf /usr/local/openldap-$IMPALA_OPENLDAP_VERSION $IMPALA_HOME/toolchain/toolchain-packages-gcc$IMPALA_GCC_VERSION/ + echo "Toolchain bootstrap complete." + fi + # Use prebuilt Hadoop native binaries for aarch64 diff --git a/Bigdata/impala/README.md b/Bigdata/impala/README.md index 5f1ceb9e..39e9701c 100644 --- a/Bigdata/impala/README.md +++ b/Bigdata/impala/README.md @@ -16,9 +16,11 @@ Learn more about Impala on [Impala Website](https://impala.apache.org/)⁠. # Supported tags and respective Dockerfile links The tag of each `impala` docker image is consist of the version of `impala` and the version of basic image. The details are as follows -| Tag | Currently | Architectures | -|----------|-------------|------------------| -|[4.4.1-oe2403lts](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.4.1/24.03-lts/Dockerfile)| Apache impala 4.4.1 on openEuler 24.03-LTS | amd64, arm64 | + +| Tag | Currently | Architectures | +|----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|---------------| +| [4.4.1-oe2403lts](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.4.1/24.03-lts/Dockerfile) | Apache impala 4.4.1 on openEuler 24.03-LTS | amd64, arm64 | +| [4.5.0-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile) | Apache impala 4.5.0 on openEuler 24.03-LTS-SP2 | amd64, arm64 | # Usage In this usage, users can select the corresponding `{Tag}` based on their requirements. diff --git a/Bigdata/impala/doc/image-info.yml b/Bigdata/impala/doc/image-info.yml index e89d3b56..5200a627 100644 --- a/Bigdata/impala/doc/image-info.yml +++ b/Bigdata/impala/doc/image-info.yml @@ -9,9 +9,10 @@ environment: | tags: | dotnet-deps镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 - | Tag | Currently | Architectures | - |----------|-------------|------------------| - |[4.4.1-oe2403lts](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.4.1/24.03-lts/Dockerfile)| Apache impala 4.4.1 on openEuler 24.03-LTS | amd64, arm64 | + | Tag | Currently | Architectures | + |----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|---------------| + | [4.4.1-oe2403lts](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.4.1/24.03-lts/Dockerfile) | Apache impala 4.4.1 on openEuler 24.03-LTS | amd64, arm64 | + | [4.5.0-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile) | Apache impala 4.5.0 on openEuler 24.03-LTS-SP2 | amd64, arm64 | download: | 拉取镜像到本地 diff --git a/Bigdata/impala/meta.yml b/Bigdata/impala/meta.yml index 44ba30ae..6fb7ffb8 100644 --- a/Bigdata/impala/meta.yml +++ b/Bigdata/impala/meta.yml @@ -1,2 +1,4 @@ 4.4.1-oe2403lts: - path: 4.4.1/24.03-lts/Dockerfile \ No newline at end of file + path: 4.4.1/24.03-lts/Dockerfile +4.5.0-oe2403sp2: + path: 4.5.0/24.03-lts-sp2/Dockerfile \ No newline at end of file -- Gitee From cc61356cf46f122004f170c026f12da422f1dd52 Mon Sep 17 00:00:00 2001 From: GuangJie1 Date: Fri, 22 Aug 2025 15:52:53 +0800 Subject: [PATCH 2/2] specify build threads --- Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile b/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile index 028ad85f..c085cb4d 100644 --- a/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile +++ b/Bigdata/impala/4.5.0/24.03-lts-sp2/Dockerfile @@ -45,6 +45,7 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \ ARG PYTHON_VERSION=3.8.11 COPY patches/build_impala.patch /opt/build_impala.patch +ENV IMPALA_BUILD_THREADS=2 RUN if [ "$TARGETARCH" = "amd64" ]; then \ BUILDARCH="x86_64"; \ elif [ "$TARGETARCH" = "arm64" ]; then \ -- Gitee