HADOOP-18401. No ARM binaries in branch-3.3.x releases. (#4953)

Fix the branch-3.3 docker image and create-release scripts to work on arm 64 and macbook m1

Contributed by Ayush Saxena and Steve Loughran
This commit is contained in:
Steve Loughran 2022-10-07 15:58:51 +01:00 committed by GitHub
parent c70b8709cc
commit 61e1603750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 15 deletions

View File

@ -205,7 +205,8 @@ function set_defaults
DOCKERRAN=false DOCKERRAN=false
CPU_ARCH=$(echo "$MACHTYPE" | cut -d- -f1) CPU_ARCH=$(echo "$MACHTYPE" | cut -d- -f1)
if [ "$CPU_ARCH" = "aarch64" ]; then if [[ "$CPU_ARCH" = "aarch64" || "$CPU_ARCH" = "arm64" ]]; then
echo "Using aarch64 docker file"
DOCKERFILE="${BASEDIR}/dev-support/docker/Dockerfile_aarch64" DOCKERFILE="${BASEDIR}/dev-support/docker/Dockerfile_aarch64"
fi fi
@ -513,7 +514,7 @@ function dockermode
# we always force build with the OpenJDK JDK # we always force build with the OpenJDK JDK
# but with the correct version # but with the correct version
if [ "$CPU_ARCH" = "aarch64" ]; then if [[ "$CPU_ARCH" = "aarch64" || "$CPU_ARCH" = "arm64" ]]; then
echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-arm64" echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-arm64"
else else
echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-amd64" echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-amd64"

View File

@ -17,7 +17,7 @@
# Dockerfile for installing the necessary dependencies for building Hadoop. # Dockerfile for installing the necessary dependencies for building Hadoop.
# See BUILDING.txt. # See BUILDING.txt.
FROM ubuntu:bionic FROM ubuntu:focal
WORKDIR /root WORKDIR /root
@ -53,6 +53,7 @@ RUN apt-get -q update \
gcc \ gcc \
git \ git \
gnupg-agent \ gnupg-agent \
hugo \
libbcprov-java \ libbcprov-java \
libbz2-dev \ libbz2-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
@ -63,10 +64,13 @@ RUN apt-get -q update \
libsnappy-dev \ libsnappy-dev \
libssl-dev \ libssl-dev \
libtool \ libtool \
libzstd1-dev \ libzstd-dev \
locales \ locales \
make \ make \
maven \ maven \
nodejs \
node-yarn \
npm \
openjdk-11-jdk \ openjdk-11-jdk \
openjdk-8-jdk \ openjdk-8-jdk \
phantomjs \ phantomjs \
@ -74,7 +78,6 @@ RUN apt-get -q update \
pkg-config \ pkg-config \
python2.7 \ python2.7 \
python3 \ python3 \
python3-dev \
python3-pip \ python3-pip \
python3-pkg-resources \ python3-pkg-resources \
python3-setuptools \ python3-setuptools \
@ -110,7 +113,7 @@ RUN mkdir -p /opt/spotbugs \
ENV SPOTBUGS_HOME /opt/spotbugs ENV SPOTBUGS_HOME /opt/spotbugs
###### ######
# Install Google Protobuf 3.7.1 (3.0.0 ships with Bionic) # Install Google Protobuf 3.7.1 (3.6.1 ships with Focal)
###### ######
# hadolint ignore=DL3003 # hadolint ignore=DL3003
RUN mkdir -p /opt/protobuf-src \ RUN mkdir -p /opt/protobuf-src \
@ -132,6 +135,12 @@ ENV PATH "${PATH}:/opt/protobuf/bin"
#### ####
RUN pip3 install pylint==2.6.0 python-dateutil==2.8.1 RUN pip3 install pylint==2.6.0 python-dateutil==2.8.1
####
# Install bower
####
# hadolint ignore=DL3008
RUN npm install -g bower@1.8.8
### ###
# Avoid out of memory errors in builds # Avoid out of memory errors in builds
### ###
@ -149,12 +158,6 @@ ENV QT_QPA_PLATFORM offscreen
# YETUS CUT HERE # YETUS CUT HERE
### ###
# Hugo static website generator (for new hadoop site docs)
RUN curl -L -o hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.58.3/hugo_0.58.3_Linux-ARM64.deb \
&& dpkg --install hugo.deb \
&& rm hugo.deb
# Add a welcome message and environment checks. # Add a welcome message and environment checks.
COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
RUN chmod 755 /root/hadoop_env_checks.sh RUN chmod 755 /root/hadoop_env_checks.sh

View File

@ -1,5 +1,5 @@
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
index a277abd6e13..1d131d5db6e 100644 index fef8c4b7e4b..8d2b9339706 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
@@ -42,18 +42,6 @@ @@ -42,18 +42,6 @@
@ -14,7 +14,7 @@ index a277abd6e13..1d131d5db6e 100644
- * the annotations of the source object.) - * the annotations of the source object.)
- * @param desc the description of the source (or null. See above.) - * @param desc the description of the source (or null. See above.)
- * @return the source object - * @return the source object
- * @exception MetricsException - * @exception MetricsException Metrics Exception.
- */ - */
- public abstract <T> T register(String name, String desc, T source); - public abstract <T> T register(String name, String desc, T source);
- -
@ -38,7 +38,7 @@ index a277abd6e13..1d131d5db6e 100644
+ * the annotations of the source object.) + * the annotations of the source object.)
+ * @param desc the description of the source (or null. See above.) + * @param desc the description of the source (or null. See above.)
+ * @return the source object + * @return the source object
* @exception MetricsException * @exception MetricsException Metrics Exception.
*/ */
- public abstract <T extends MetricsSink> - public abstract <T extends MetricsSink>
- T register(String name, String desc, T sink); - T register(String name, String desc, T sink);