Skip to content

Commit 4a38cf9

Browse files
authored
Merge branch 'trunk' into HADOOP-19231-jackson
2 parents a4befb7 + c593c17 commit 4a38cf9

File tree

30 files changed

+1440
-69
lines changed

30 files changed

+1440
-69
lines changed

LICENSE-binary

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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"

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/src/main/java/org/apache/hadoop/conf/Configuration.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import java.util.Arrays;
4949
import java.util.Collection;
5050
import java.util.Collections;
51+
import java.util.EnumSet;
5152
import java.util.Enumeration;
5253
import java.util.HashMap;
5354
import java.util.HashSet;
@@ -98,6 +99,7 @@
9899
import org.apache.hadoop.security.alias.CredentialProvider.CredentialEntry;
99100
import org.apache.hadoop.security.alias.CredentialProviderFactory;
100101
import org.apache.hadoop.thirdparty.com.google.common.base.Strings;
102+
import org.apache.hadoop.util.ConfigurationHelper;
101103
import org.apache.hadoop.util.JacksonUtil;
102104
import org.apache.hadoop.util.Preconditions;
103105
import org.apache.hadoop.util.ReflectionUtils;
@@ -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)