Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ com.aliyun:aliyun-java-sdk-sts:3.0.0
com.aliyun.oss:aliyun-sdk-oss:3.13.2
com.cedarsoftware:java-util:1.9.0
com.cedarsoftware:json-io:2.5.1
com.fasterxml.jackson.core:jackson-annotations:2.14.3
com.fasterxml.jackson.core:jackson-core:2.14.3
com.fasterxml.jackson.core:jackson-databind:2.14.3
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.14.3
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.14.3
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.3
com.fasterxml.jackson.core:jackson-annotations:2.18.5
com.fasterxml.jackson.core:jackson-core:2.18.5
com.fasterxml.jackson.core:jackson-databind:2.18.5
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.18.5
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.18.5
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.18.5
com.fasterxml.uuid:java-uuid-generator:3.1.4
com.fasterxml.woodstox:woodstox-core:5.4.0
com.github.ben-manes.caffeine:caffeine:2.9.3
Expand Down
15 changes: 13 additions & 2 deletions hadoop-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<jaxb.version>2.3.9</jaxb.version>

<!-- jackson versions -->
<jackson2.version>2.14.3</jackson2.version>
<jackson2.databind.version>2.14.3</jackson2.databind.version>
<jackson2.version>2.18.5</jackson2.version>
<jackson2.databind.version>2.18.5</jackson2.databind.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be easier to use jackson-bom for version management.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or at least define jackson2.databind.version as ${jackson2.version} until some need to actually diverge surfaces again in future


<!-- httpcomponents versions -->
<httpclient.version>4.5.13</httpclient.version>
Expand Down Expand Up @@ -1280,12 +1280,23 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>${jackson2.version}</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>
<version>${jackson2.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>net.jodah</groupId>
<artifactId>failsafe</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
import org.apache.hadoop.classification.InterfaceAudience.Private;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
import org.apache.hadoop.yarn.api.records.timeline.TimelineAbout;


/**
Expand All @@ -51,6 +53,9 @@ public YarnJacksonJaxbJsonProvider() {
public ObjectMapper locateMapper(Class<?> type, MediaType mediaType) {
ObjectMapper mapper = super.locateMapper(type, mediaType);
configObjectMapper(mapper);
if (type == TimelineAbout.class) {
mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);
}
return mapper;
}

Expand Down