Skip to content

Commit d364ac4

Browse files
Merge branch 'apache:trunk' into trunk
2 parents 0fba78f + 55a5769 commit d364ac4

File tree

233 files changed

+13741
-992
lines changed

Some content is hidden

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

233 files changed

+13741
-992
lines changed

LICENSE-binary

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ com.fasterxml.woodstox:woodstox-core:5.4.0
229229
com.github.ben-manes.caffeine:caffeine:2.9.3
230230
com.github.davidmoten:rxjava-extras:0.8.0.17
231231
com.github.stephenc.jcip:jcip-annotations:1.0-1
232-
com.google:guice:4.0
233-
com.google:guice-servlet:4.0
232+
com.google:guice:5.1.0
233+
com.google:guice-servlet:5.1.0
234234
com.google.api.grpc:proto-google-common-protos:1.0.0
235235
com.google.code.gson:2.9.0
236236
com.google.errorprone:error_prone_annotations:2.2.0
@@ -362,7 +362,7 @@ org.objenesis:objenesis:2.6
362362
org.xerial.snappy:snappy-java:1.1.10.4
363363
org.yaml:snakeyaml:2.0
364364
org.wildfly.openssl:wildfly-openssl:1.1.3.Final
365-
software.amazon.awssdk:bundle:jar:2.24.6
365+
software.amazon.awssdk:bundle:jar:2.25.53
366366

367367

368368
--------------------------------------------------------------------------------
@@ -379,7 +379,7 @@ hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/util/tree
379379
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/compat/{fstatat|openat|unlinkat}.h
380380

381381
com.github.luben:zstd-jni:1.5.2-1
382-
dnsjava:dnsjava:2.1.7
382+
dnsjava:dnsjava:3.6.1
383383
org.codehaus.woodstox:stax2-api:4.2.1
384384

385385

dev-support/bin/create-release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function set_defaults
205205
DOCKERRAN=false
206206

207207
CPU_ARCH=$(echo "$MACHTYPE" | cut -d- -f1)
208-
if [ "$CPU_ARCH" = "aarch64" ]; then
208+
if [[ "$CPU_ARCH" = "aarch64" || "$CPU_ARCH" = "arm64" ]]; then
209209
DOCKERFILE="${BASEDIR}/dev-support/docker/Dockerfile_aarch64"
210210
fi
211211

@@ -514,7 +514,7 @@ function dockermode
514514

515515
# we always force build with the OpenJDK JDK
516516
# but with the correct version
517-
if [ "$CPU_ARCH" = "aarch64" ]; then
517+
if [[ "$CPU_ARCH" = "aarch64" || "$CPU_ARCH" = "arm64" ]]; then
518518
echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-arm64"
519519
else
520520
echo "ENV JAVA_HOME /usr/lib/jvm/java-${JVM_VERSION}-openjdk-amd64"

dev-support/docker/Dockerfile_centos_7

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ COPY pkg-resolver pkg-resolver
3030
RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
3131
&& chmod a+r pkg-resolver/*.json
3232

33+
######
34+
# Centos 7 has reached its EOL and the packages
35+
# are no longer available on mirror.centos.org site.
36+
# Please see https://www.centos.org/centos-linux-eol/
37+
######
38+
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7
39+
3340
######
3441
# Install packages from yum
3542
######
@@ -38,8 +45,13 @@ RUN yum update -y \
3845
&& yum groupinstall -y "Development Tools" \
3946
&& yum install -y \
4047
centos-release-scl \
41-
python3 \
42-
&& yum install -y $(pkg-resolver/resolve.py centos:7)
48+
python3
49+
50+
# Apply the script again because centos-release-scl creates new YUM repo files
51+
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7
52+
53+
# hadolint ignore=DL3008,SC2046
54+
RUN yum install -y $(pkg-resolver/resolve.py centos:7)
4355

4456
# Set GCC 9 as the default C/C++ compiler
4557
RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc

dev-support/docker/pkg-resolver/install-yasm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fi
4040

4141
if [ "$version_to_install" == "1.2.0-4" ]; then
4242
mkdir -p /tmp/yasm &&
43-
curl -L -s -S https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/y/yasm-1.2.0-4.el7.x86_64.rpm \
43+
curl -L -s -S https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/y/yasm-1.2.0-4.el7.x86_64.rpm \
4444
-o /tmp/yasm-1.2.0-4.el7.x86_64.rpm &&
4545
rpm -Uvh /tmp/yasm-1.2.0-4.el7.x86_64.rpm
4646
else

dev-support/docker/pkg-resolver/set-vault-as-baseurl-centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fi
2424
if [ "$1" == "centos:7" ] || [ "$1" == "centos:8" ]; then
2525
cd /etc/yum.repos.d/ || exit &&
2626
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* &&
27-
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
27+
sed -i 's|# *baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
2828
yum update -y &&
2929
cd /root || exit
3030
else

hadoop-client-modules/hadoop-client-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ allowed_expr+="|^[^-]*-default.xml$"
5151
allowed_expr+="|^[^-]*-version-info.properties$"
5252
# * Hadoop's application classloader properties file.
5353
allowed_expr+="|^org.apache.hadoop.application-classloader.properties$"
54+
# Comes from dnsjava, not sure if relocatable.
55+
allowed_expr+="|^messages.properties$"
5456
# public suffix list used by httpcomponents
5557
allowed_expr+="|^mozilla/$"
5658
allowed_expr+="|^mozilla/public-suffix-list.txt$"

hadoop-client-modules/hadoop-client-runtime/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@
229229
<exclude>jnamed*</exclude>
230230
<exclude>lookup*</exclude>
231231
<exclude>update*</exclude>
232+
<exclude>META-INF/versions/21/*</exclude>
233+
<exclude>META-INF/versions/21/**/*</exclude>
232234
</excludes>
233235
</filter>
234236
<filter>
@@ -243,6 +245,7 @@
243245
<excludes>
244246
<exclude>META-INF/versions/9/module-info.class</exclude>
245247
<exclude>META-INF/versions/11/module-info.class</exclude>
248+
<exclude>META-INF/versions/21/module-info.class</exclude>
246249
</excludes>
247250
</filter>
248251

hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,4 +454,10 @@
454454
<Class name="org.apache.hadoop.ipc.internal.ShadedProtobufHelper" />
455455
<Bug pattern="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" />
456456
</Match>
457+
458+
<!-- class cast after an assignableFrom check. -->
459+
<Match>
460+
<Class name="org.apache.hadoop.util.dynamic.DynMethods" />
461+
<Bug pattern="BC_UNCONFIRMED_CAST" />
462+
</Match>
457463
</FindBugsFilter>

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,17 @@
708708
</filesets>
709709
</configuration>
710710
</plugin>
711+
712+
<plugin>
713+
<groupId>org.apache.maven.plugins</groupId>
714+
<artifactId>maven-javadoc-plugin</artifactId>
715+
<configuration>
716+
<sourceFileExcludes>
717+
<sourceFileExclude>**/FSProtos.java</sourceFileExclude>
718+
</sourceFileExcludes>
719+
<excludePackageNames>*.proto:*.tracing:*.protobuf</excludePackageNames>
720+
</configuration>
721+
</plugin>
711722
</plugins>
712723
</build>
713724

@@ -1279,16 +1290,6 @@
12791290
</execution>
12801291
</executions>
12811292
</plugin>
1282-
<plugin>
1283-
<groupId>org.apache.maven.plugins</groupId>
1284-
<artifactId>maven-javadoc-plugin</artifactId>
1285-
<configuration>
1286-
<sourceFileExcludes>
1287-
<sourceFileExclude>**/FSProtos.java</sourceFileExclude>
1288-
</sourceFileExcludes>
1289-
<excludePackageNames>*.proto:*.tracing:*.protobuf</excludePackageNames>
1290-
</configuration>
1291-
</plugin>
12921293
</plugins>
12931294
</build>
12941295
</profile>

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import java.util.Arrays;
5050
import java.util.Collection;
5151
import java.util.Collections;
52+
import java.util.EnumSet;
5253
import java.util.Enumeration;
5354
import java.util.HashMap;
5455
import java.util.HashSet;
@@ -99,6 +100,7 @@
99100
import org.apache.hadoop.security.alias.CredentialProvider.CredentialEntry;
100101
import org.apache.hadoop.security.alias.CredentialProviderFactory;
101102
import org.apache.hadoop.thirdparty.com.google.common.base.Strings;
103+
import org.apache.hadoop.util.ConfigurationHelper;
102104
import org.apache.hadoop.util.Preconditions;
103105
import org.apache.hadoop.util.ReflectionUtils;
104106
import org.apache.hadoop.util.StringInterner;
@@ -1786,6 +1788,26 @@ public <T extends Enum<T>> T getEnum(String name, T defaultValue) {
17861788
: Enum.valueOf(defaultValue.getDeclaringClass(), val);
17871789
}
17881790

1791+
/**
1792+
* Build an enumset from a comma separated list of values.
1793+
* Case independent.
1794+
* Special handling of "*" meaning: all values.
1795+
* @param key key to look for
1796+
* @param enumClass class of enum
1797+
* @param ignoreUnknown should unknown values raise an exception?
1798+
* @return a mutable set of the identified enum values declared in the configuration
1799+
* @param <E> enumeration type
1800+
* @throws IllegalArgumentException if one of the entries was unknown and ignoreUnknown is false,
1801+
* or there are two entries in the enum which differ only by case.
1802+
*/
1803+
public <E extends Enum<E>> EnumSet<E> getEnumSet(
1804+
final String key,
1805+
final Class<E> enumClass,
1806+
final boolean ignoreUnknown) throws IllegalArgumentException {
1807+
final String value = get(key, "");
1808+
return ConfigurationHelper.parseEnumSet(key, value, enumClass, ignoreUnknown);
1809+
}
1810+
17891811
enum ParsedTimeDuration {
17901812
NS {
17911813
TimeUnit unit() { return TimeUnit.NANOSECONDS; }

0 commit comments

Comments
 (0)