Skip to content

Commit cc37c23

Browse files
authored
HDDS-12804. Include Hadoop native library libhadoop.so (#46)
1 parent c484c70 commit cc37c23

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ RUN set -eux ; \
110110
curl -L ${url} | tar xvz ; \
111111
mv async-profiler-* /opt/profiler
112112

113+
# Hadoop native libary (Hadoop 3.4.1 doesn't have aarch64 binary)
114+
RUN set -eux ; \
115+
ARCH="$(arch)" ; \
116+
hadoop_version=3.4.0 ; \
117+
case "${ARCH}" in \
118+
x86_64) file=hadoop-${hadoop_version}.tar.gz ;; \
119+
aarch64) file=hadoop-${hadoop_version}-aarch64.tar.gz ;; \
120+
*) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
121+
esac; \
122+
curl -L "https://www.apache.org/dyn/closer.lua?action=download&filename=hadoop/common/hadoop-${hadoop_version}/$file" -o "hadoop-${hadoop_version}.tar.gz" && \
123+
tar xzvf hadoop-${hadoop_version}.tar.gz -C /tmp && \
124+
mv /tmp/hadoop-${hadoop_version}/lib/native/libhadoop.* /usr/lib/ && \
125+
rm -rf /tmp/hadoop-${hadoop_version} && \
126+
rm -f hadoop-${hadoop_version}.tar.gz
127+
113128
# OpenJDK 21
114129
RUN set -eux ; \
115130
ARCH="$(arch)"; \

0 commit comments

Comments
 (0)