From c2575ae1926d14eb7d1a84295da633eacb7433a7 Mon Sep 17 00:00:00 2001 From: xeniape Date: Mon, 16 Dec 2024 12:53:50 +0100 Subject: [PATCH 1/3] fix: activate include-hadoop profile for nifi 2.* --- nifi/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nifi/Dockerfile b/nifi/Dockerfile index bf8f73a9..c035b030 100644 --- a/nifi/Dockerfile +++ b/nifi/Dockerfile @@ -45,7 +45,13 @@ RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackabl patches/apply_patches.sh ${PRODUCT} && \ # Build NiFi cd /stackable/nifi-${PRODUCT}-src/ && \ - mvn --batch-mode --no-transfer-progress clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws,include-hadoop-azure,include-hadoop-gcp && \ + # NOTE: Since NiFi 2.0.0 PutIceberg Processor and services were removed, so including the `include-iceberg` profile does nothing. + # Additionally some modules were moved to optional build profiles, so we need to add `include-hadoop` to get `nifi-parquet-nar` for example. + if [[ "${PRODUCT}" == 2.* ]] ; then \ + mvn --batch-mode --no-transfer-progress clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-hadoop,include-hadoop-aws,include-hadoop-azure,include-hadoop-gcp ; \ + else \ + mvn --batch-mode --no-transfer-progress clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws,include-hadoop-azure,include-hadoop-gcp ; \ + fi && \ # Copy the binaries to the /stackable folder mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \ # Copy the SBOM as well @@ -112,7 +118,7 @@ USER ${STACKABLE_USER_UID} ENV HOME=/stackable ENV NIFI_HOME=/stackable/nifi -ENV PATH="${PATH}":/stackable/nifi/bin +ENV PATH="${PATH}:/stackable/nifi/bin" WORKDIR /stackable/nifi CMD ["bin/nifi.sh", "run"] From 78b7478f3b184f2d8d1423f7e04f0764e926d702 Mon Sep 17 00:00:00 2001 From: xeniape Date: Mon, 16 Dec 2024 13:00:06 +0100 Subject: [PATCH 2/3] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b31dae4e..34c4c380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ### Added +- nifi: Activate `include-hadoop` profile for NiFi version 2.* ([#958]). - nifi: Add NiFi hadoop Azure and GCP libraries ([#943]). - base: Add containerdebug tool ([#928]). - tools: Add the package util-linux-core ([#952]). @@ -28,6 +29,7 @@ All notable changes to this project will be documented in this file. [#952]: https://github.com/stackabletech/docker-images/pull/952 [#953]: https://github.com/stackabletech/docker-images/pull/953 [#955]: https://github.com/stackabletech/docker-images/pull/955 +[#958]: https://github.com/stackabletech/docker-images/pull/958 ## [24.11.0] - 2024-11-18 From bf47991e637b2617f47355585c9e1ab2b26874de Mon Sep 17 00:00:00 2001 From: xeniape Date: Wed, 18 Dec 2024 12:33:34 +0100 Subject: [PATCH 3/3] revert if logic for versions --- nifi/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi/Dockerfile b/nifi/Dockerfile index c035b030..0fc502ce 100644 --- a/nifi/Dockerfile +++ b/nifi/Dockerfile @@ -18,7 +18,7 @@ RUN microdnf update && \ # [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.9.6,). # WORKDIR /tmp -RUN if [[ "${PRODUCT}" == 2.* ]] ; then \ +RUN if [[ "${PRODUCT}" != 1.* ]] ; then \ curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \ ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \ fi @@ -47,7 +47,7 @@ RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackabl cd /stackable/nifi-${PRODUCT}-src/ && \ # NOTE: Since NiFi 2.0.0 PutIceberg Processor and services were removed, so including the `include-iceberg` profile does nothing. # Additionally some modules were moved to optional build profiles, so we need to add `include-hadoop` to get `nifi-parquet-nar` for example. - if [[ "${PRODUCT}" == 2.* ]] ; then \ + if [[ "${PRODUCT}" != 1.* ]] ; then \ mvn --batch-mode --no-transfer-progress clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-hadoop,include-hadoop-aws,include-hadoop-azure,include-hadoop-gcp ; \ else \ mvn --batch-mode --no-transfer-progress clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws,include-hadoop-azure,include-hadoop-gcp ; \