Skip to content

Commit 77a6239

Browse files
authored
fix(nifi): Activate "include-hadoop" profile for nifi 2.* (#958)
* fix: activate include-hadoop profile for nifi 2.* * add changelog entry * revert if logic for versions
1 parent 192c3f3 commit 77a6239

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9+
- nifi: Activate `include-hadoop` profile for NiFi version 2.* ([#958]).
910
- nifi: Add NiFi hadoop Azure and GCP libraries ([#943]).
1011
- base: Add containerdebug tool ([#928], [#959]).
1112
- tools: Add the package util-linux-core ([#952]).
@@ -28,6 +29,7 @@ All notable changes to this project will be documented in this file.
2829
[#952]: https://github.com/stackabletech/docker-images/pull/952
2930
[#953]: https://github.com/stackabletech/docker-images/pull/953
3031
[#955]: https://github.com/stackabletech/docker-images/pull/955
32+
[#958]: https://github.com/stackabletech/docker-images/pull/958
3133
[#959]: https://github.com/stackabletech/docker-images/pull/959
3234

3335
## [24.11.0] - 2024-11-18

nifi/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN microdnf update && \
1818
# [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.9.6,).
1919
#
2020
WORKDIR /tmp
21-
RUN if [[ "${PRODUCT}" == 2.* ]] ; then \
21+
RUN if [[ "${PRODUCT}" != 1.* ]] ; then \
2222
curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \
2323
ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \
2424
fi
@@ -45,7 +45,13 @@ RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackabl
4545
patches/apply_patches.sh ${PRODUCT} && \
4646
# Build NiFi
4747
cd /stackable/nifi-${PRODUCT}-src/ && \
48-
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 && \
48+
# NOTE: Since NiFi 2.0.0 PutIceberg Processor and services were removed, so including the `include-iceberg` profile does nothing.
49+
# Additionally some modules were moved to optional build profiles, so we need to add `include-hadoop` to get `nifi-parquet-nar` for example.
50+
if [[ "${PRODUCT}" != 1.* ]] ; then \
51+
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 ; \
52+
else \
53+
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 ; \
54+
fi && \
4955
# Copy the binaries to the /stackable folder
5056
mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \
5157
# Copy the SBOM as well
@@ -112,7 +118,7 @@ USER ${STACKABLE_USER_UID}
112118

113119
ENV HOME=/stackable
114120
ENV NIFI_HOME=/stackable/nifi
115-
ENV PATH="${PATH}":/stackable/nifi/bin
121+
ENV PATH="${PATH}:/stackable/nifi/bin"
116122

117123
WORKDIR /stackable/nifi
118124
CMD ["bin/nifi.sh", "run"]

0 commit comments

Comments
 (0)