Skip to content

Commit c8fe5c8

Browse files
authored
Merge branch 'apache:trunk' into HDFS-17769
2 parents e266a52 + 950d876 commit c8fe5c8

1,186 files changed

Lines changed: 23390 additions & 18454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILDING.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ This requires a recent version of docker (1.4.1 and higher are known to work).
2929
On Linux / Mac:
3030
Install Docker and run this command:
3131

32-
$ ./start-build-env.sh
32+
$ ./start-build-env.sh [OS platform]
33+
34+
- [OS Platform] One of [centos_7, centos_8, debian_10, ubuntu_20, ubuntu_24, windows_10].
35+
Default is 'ubuntu_20'.
36+
Note: Currently only default ('ubuntu_20') is supported on arm machine
3337

3438
The prompt which is then presented is located at a mounted version of the source tree
3539
and all required tools for testing and building have been installed and configured.
@@ -593,18 +597,16 @@ configure the bit-ness of the build, and set several optional components.
593597
Several tests require that the user must have the Create Symbolic Links
594598
privilege.
595599

596-
To simplify the installation of Boost, Protocol buffers, OpenSSL and Zlib dependencies we can use
597-
vcpkg (https://github.com/Microsoft/vcpkg.git). Upon cloning the vcpkg repo, checkout the commit
598-
7ffa425e1db8b0c3edf9c50f2f3a0f25a324541d to get the required versions of the dependencies
599-
mentioned above.
600-
> git clone https://github.com/Microsoft/vcpkg.git
600+
We use vcpkg (https://github.com/microsoft/vcpkg.git) for installing Boost, Protocol buffers,
601+
OpenSSL and Zlib dependencies. Run the following commands to setup these dependencies.
602+
> git clone https://github.com/microsoft/vcpkg.git
601603
> cd vcpkg
602-
> git checkout 7ffa425e1db8b0c3edf9c50f2f3a0f25a324541d
604+
> git fetch --all
605+
> git checkout 2025.03.19
603606
> .\bootstrap-vcpkg.bat
604-
> .\vcpkg.exe install boost:x64-windows
605-
> .\vcpkg.exe install protobuf:x64-windows
606-
> .\vcpkg.exe install openssl:x64-windows
607-
> .\vcpkg.exe install zlib:x64-windows
607+
(Assuming that vcpkg was checked out at C:\vcpkg and Hadoop at C:\hadoop)
608+
> copy C:\hadoop\dev-support\docker\vcpkg\vcpkg.json C:\vcpkg
609+
> .\vcpkg.exe install --x-install-root .\installed
608610

609611
Set the following environment variables -
610612
(Assuming that vcpkg was checked out at C:\vcpkg)

LICENSE-binary

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ com.aliyun:aliyun-java-sdk-sts:3.0.0
218218
com.aliyun.oss:aliyun-sdk-oss:3.13.2
219219
com.cedarsoftware:java-util:1.9.0
220220
com.cedarsoftware:json-io:2.5.1
221-
com.fasterxml.jackson.core:jackson-annotations:2.12.7
222-
com.fasterxml.jackson.core:jackson-core:2.12.7
223-
com.fasterxml.jackson.core:jackson-databind:2.12.7.1
224-
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.12.7
225-
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.12.7
226-
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.12.7
221+
com.fasterxml.jackson.core:jackson-annotations:2.14.3
222+
com.fasterxml.jackson.core:jackson-core:2.14.3
223+
com.fasterxml.jackson.core:jackson-databind:2.14.3
224+
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.14.3
225+
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.14.3
226+
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.3
227227
com.fasterxml.uuid:java-uuid-generator:3.1.4
228228
com.fasterxml.woodstox:woodstox-core:5.4.0
229229
com.github.ben-manes.caffeine:caffeine:2.9.3
@@ -298,12 +298,11 @@ javax.inject:javax.inject:1
298298
net.java.dev.jna:jna:5.2.0
299299
net.minidev:accessors-smart:1.2
300300
org.apache.avro:avro:1.11.4
301-
org.apache.avro:avro:1.11.3
302301
org.apache.commons:commons-compress:1.26.1
303302
org.apache.commons:commons-configuration2:2.10.1
304303
org.apache.commons:commons-csv:1.9.0
305304
org.apache.commons:commons-digester:1.8.1
306-
org.apache.commons:commons-lang3:3.12.0
305+
org.apache.commons:commons-lang3:3.17.0
307306
org.apache.commons:commons-math3:3.6.1
308307
org.apache.commons:commons-text:1.10.0
309308
org.apache.commons:commons-validator:1.6
@@ -505,8 +504,7 @@ javax.cache:cache-api:1.1.1
505504
javax.servlet:javax.servlet-api:3.1.0
506505
javax.servlet.jsp:jsp-api:2.1
507506
javax.websocket:javax.websocket-api:1.0
508-
javax.ws.rs:jsr311-api:1.1.1
509-
javax.xml.bind:jaxb-api:2.2.11
507+
javax.xml.bind:jaxb-api:2.3.1
510508

511509
Eclipse Distribution License (EDL) 1.0
512510
--------------------------
@@ -538,7 +536,7 @@ org.glassfish.jersey.core:jersey-server:2.46
538536
org.glassfish.jersey.inject:jersey-hk2:2.46
539537
org.glassfish.jersey.core:jersey-client:2.46
540538
org.glassfish.jersey.test-framework:jersey-test-framework-core:2.46
541-
org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.46
539+
org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:2.46
542540
org.glassfish.jersey.containers:jersey-container-servlet:2.46
543541
org.glassfish.jersey.containers:jersey-container-servlet-core:2.46
544542
org.glassfish.jersey.media:jersey-media-json-jettison:2.46

dev-support/docker/Dockerfile_aarch64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
4646
RUN apt-get -q update \
4747
&& apt-get -q install -y --no-install-recommends wget apt-transport-https gpg gpg-agent gawk ca-certificates \
4848
&& apt-get -q install -y --no-install-recommends python3 \
49+
&& apt-get -q install -y --no-install-recommends phantomjs \
4950
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" > /etc/apt/sources.list.d/adoptium.list \
5051
&& wget -q -O - https://packages.adoptium.net/artifactory/api/gpg/key/public > /etc/apt/trusted.gpg.d/adoptium.asc \
5152
&& apt-get -q update \
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Dockerfile for installing the necessary dependencies for building Hadoop.
18+
# See BUILDING.txt.
19+
20+
FROM ubuntu:noble
21+
22+
WORKDIR /root
23+
24+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
25+
26+
#####
27+
# Disable suggests/recommends
28+
#####
29+
RUN echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras
30+
RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
31+
32+
ENV DEBIAN_FRONTEND noninteractive
33+
ENV DEBCONF_TERSE true
34+
35+
######
36+
# Platform package dependency resolver
37+
######
38+
COPY pkg-resolver pkg-resolver
39+
RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
40+
&& chmod a+r pkg-resolver/*.json
41+
42+
######
43+
# Install packages from apt
44+
######
45+
# hadolint ignore=DL3008,SC2046
46+
RUN apt-get -q update \
47+
&& apt-get -q install -y --no-install-recommends wget apt-transport-https gpg gpg-agent gawk ca-certificates \
48+
&& apt-get -q install -y --no-install-recommends python3 \
49+
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" > /etc/apt/sources.list.d/adoptium.list \
50+
&& wget -q -O - https://packages.adoptium.net/artifactory/api/gpg/key/public > /etc/apt/trusted.gpg.d/adoptium.asc \
51+
&& apt-get -q update \
52+
&& apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py ubuntu:noble) \
53+
&& apt-get clean \
54+
&& update-java-alternatives -s java-1.17.0-openjdk-amd64 \
55+
&& rm -rf /var/lib/apt/lists/*
56+
57+
RUN locale-gen en_US.UTF-8
58+
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
59+
ENV PYTHONIOENCODING=utf-8
60+
61+
######
62+
# Set env vars required to build Hadoop
63+
######
64+
ENV MAVEN_HOME /usr
65+
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
66+
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
67+
68+
#######
69+
# Set env vars for SpotBugs 4.2.2
70+
#######
71+
ENV SPOTBUGS_HOME /opt/spotbugs
72+
73+
#######
74+
# Set env vars for Google Protobuf 3.21.12
75+
#######
76+
ENV PROTOBUF_HOME /opt/protobuf
77+
ENV PATH "${PATH}:/opt/protobuf/bin"
78+
79+
###
80+
# Avoid out of memory errors in builds
81+
###
82+
ENV MAVEN_OPTS -Xms256m -Xmx3072m
83+
84+
# Skip gpg verification when downloading Yetus via yetus-wrapper
85+
ENV HADOOP_SKIP_YETUS_VERIFICATION true
86+
87+
####
88+
# Install packages
89+
####
90+
RUN pkg-resolver/install-spotbugs.sh ubuntu:noble
91+
RUN pkg-resolver/install-boost.sh ubuntu:noble
92+
RUN pkg-resolver/install-protobuf.sh ubuntu:noble
93+
RUN pkg-resolver/install-hadolint.sh ubuntu:noble
94+
RUN pkg-resolver/install-intel-isa-l.sh ubuntu:noble
95+
96+
###
97+
# Everything past this point is either not needed for testing or breaks Yetus.
98+
# So tell Yetus not to read the rest of the file:
99+
# YETUS CUT HERE
100+
###
101+
102+
# Add a welcome message and environment checks.
103+
COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
104+
RUN chmod 755 /root/hadoop_env_checks.sh
105+
# hadolint ignore=SC2016
106+
RUN echo '${HOME}/hadoop_env_checks.sh' >> /root/.bashrc

dev-support/docker/Dockerfile_windows_10

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,20 @@ RUN powershell Copy-Item -Recurse -Path 'C:\Program Files\Git' -Destination C:\G
4949
# hadolint ignore=DL3003
5050
RUN powershell git clone https://github.com/microsoft/vcpkg.git \
5151
&& cd vcpkg \
52-
&& git checkout 7ffa425e1db8b0c3edf9c50f2f3a0f25a324541d \
52+
&& git fetch --all \
53+
&& git checkout 2025.03.19 \
5354
&& .\bootstrap-vcpkg.bat
5455

55-
# Fix wrong download link for 7-zip in .\vcpkg\scripts\vcpkgTools.xml:
56-
# - https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 (not working anymore) is replaced with
57-
# - https://globalcdn.nuget.org/packages/7-zip.commandline.18.1.0.nupkg?packageVersion=18.1.0 (working)
58-
# Replacing is done using the Linux tool "sed".
59-
RUN choco install sed -y
60-
RUN sed -i "s,https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0,https://globalcdn.nuget.org/packages/7-zip.commandline.18.1.0.nupkg?packageVersion=18.1.0,g" .\vcpkg\scripts\vcpkgTools.xml
56+
ADD vcpkg/vcpkg.json .
6157

62-
RUN powershell .\vcpkg\vcpkg.exe install boost:x64-windows
63-
RUN powershell .\vcpkg\vcpkg.exe install protobuf:x64-windows
64-
RUN powershell .\vcpkg\vcpkg.exe install openssl:x64-windows
65-
RUN powershell .\vcpkg\vcpkg.exe install zlib:x64-windows
58+
RUN powershell .\vcpkg\vcpkg.exe install --x-install-root .\vcpkg\installed
6659

6760
# Install Azul Java 8 JDK.
6861
RUN powershell Invoke-WebRequest -URI https://cdn.azul.com/zulu/bin/zulu8.62.0.19-ca-jdk8.0.332-win_x64.zip -OutFile $Env:TEMP\zulu8.62.0.19-ca-jdk8.0.332-win_x64.zip
6962
RUN powershell Expand-Archive -Path $Env:TEMP\zulu8.62.0.19-ca-jdk8.0.332-win_x64.zip -DestinationPath "C:\Java"
7063

7164
# Install Apache Maven.
72-
RUN powershell Invoke-WebRequest -URI https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip -OutFile $Env:TEMP\apache-maven-3.8.8-bin.zip
65+
RUN powershell Invoke-WebRequest -URI https://archive.apache.org/dist/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip -OutFile $Env:TEMP\apache-maven-3.8.8-bin.zip
7366
RUN powershell Expand-Archive -Path $Env:TEMP\apache-maven-3.8.8-bin.zip -DestinationPath "C:\Maven"
7467

7568
# Install CMake 3.19.0.
@@ -82,16 +75,16 @@ RUN powershell Expand-Archive -Path $Env:TEMP\zstd-v1.5.4-win64.zip -Destination
8275
RUN setx PATH "%PATH%;C:\ZStd"
8376

8477
# Install libopenssl 3.1.1 needed for rsync 3.2.7.
85-
RUN powershell Invoke-WebRequest -Uri https://repo.msys2.org/msys/x86_64/libopenssl-3.1.1-1-x86_64.pkg.tar.zst -OutFile $Env:TEMP\libopenssl-3.1.1-1-x86_64.pkg.tar.zst
86-
RUN powershell zstd -d $Env:TEMP\libopenssl-3.1.1-1-x86_64.pkg.tar.zst -o $Env:TEMP\libopenssl-3.1.1-1-x86_64.pkg.tar
78+
RUN powershell Invoke-WebRequest -Uri https://repo.msys2.org/msys/x86_64/libopenssl-3.1.2-1-x86_64.pkg.tar.zst -OutFile $Env:TEMP\libopenssl-3.1.2-1-x86_64.pkg.tar.zst
79+
RUN powershell zstd -d $Env:TEMP\libopenssl-3.1.2-1-x86_64.pkg.tar.zst -o $Env:TEMP\libopenssl-3.1.1-1-x86_64.pkg.tar
8780
RUN powershell mkdir "C:\LibOpenSSL"
8881
RUN powershell tar -xvf $Env:TEMP\libopenssl-3.1.1-1-x86_64.pkg.tar -C "C:\LibOpenSSL"
8982

90-
# Install libxxhash 0.8.1 needed for rsync 3.2.7.
91-
RUN powershell Invoke-WebRequest -Uri https://repo.msys2.org/msys/x86_64/libxxhash-0.8.1-1-x86_64.pkg.tar.zst -OutFile $Env:TEMP\libxxhash-0.8.1-1-x86_64.pkg.tar.zst
92-
RUN powershell zstd -d $Env:TEMP\libxxhash-0.8.1-1-x86_64.pkg.tar.zst -o $Env:TEMP\libxxhash-0.8.1-1-x86_64.pkg.tar
83+
# Install libxxhash 0.8.3 needed for rsync 3.2.7.
84+
RUN powershell Invoke-WebRequest -Uri https://repo.msys2.org/msys/x86_64/libxxhash-0.8.3-1-x86_64.pkg.tar.zst -OutFile $Env:TEMP\libxxhash-0.8.3-1-x86_64.pkg.tar.zst
85+
RUN powershell zstd -d $Env:TEMP\libxxhash-0.8.3-1-x86_64.pkg.tar.zst -o $Env:TEMP\libxxhash-0.8.3-1-x86_64.pkg.tar
9386
RUN powershell mkdir "C:\LibXXHash"
94-
RUN powershell tar -xvf $Env:TEMP\libxxhash-0.8.1-1-x86_64.pkg.tar -C "C:\LibXXHash"
87+
RUN powershell tar -xvf $Env:TEMP\libxxhash-0.8.3-1-x86_64.pkg.tar -C "C:\LibXXHash"
9588

9689
# Install libzstd 1.5.4 needed for rsync 3.2.7.
9790
RUN powershell Invoke-WebRequest -Uri https://repo.msys2.org/msys/x86_64/libzstd-1.5.5-1-x86_64.pkg.tar.zst -OutFile $Env:TEMP\libzstd-1.5.5-1-x86_64.pkg.tar.zst
@@ -126,6 +119,11 @@ RUN powershell pkg-resolver\install-python.ps1
126119
RUN powershell pkg-resolver\install-pip.ps1
127120
RUN powershell pip install python-dateutil
128121

122+
## Install the Microsoft Visual C++ 2010 Redistributable to link leveldbjni native library
123+
RUN powershell -Command Invoke-WebRequest -Uri https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe -OutFile vcredist_x64.exe
124+
RUN powershell -Command Start-Process -FilePath .\vcredist_x64.exe -ArgumentList '/quiet', '/norestart' -Wait
125+
RUN powershell -Command Remove-Item vcredist_x64.exe
126+
129127
# Create a user HadoopBuilder with basic privileges and use it for building Hadoop on Windows.
130128
RUN powershell New-LocalUser -Name 'HadoopBuilder' -Description 'User account for building Apache Hadoop' -Password ([securestring]::new()) -AccountNeverExpires -PasswordNeverExpires
131129

0 commit comments

Comments
 (0)