[
https://issues.apache.org/jira/browse/HADOOP-19951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103633#comment-18103633
]
ASF GitHub Bot commented on HADOOP-19951:
-----------------------------------------
pjfanning commented on PR #8654:
URL: https://github.com/apache/hadoop/pull/8654#issuecomment-5251965837
> @pjfanning thanks for your effort, I go through the non-test code and
`pom.xml` changes, almost LGTM, but I think we should not add
`com.fasterxml.jackson.annotation.*` to Hadoop public API, and I believe it can
be replaced with a caller-side static method or something else that easy to
implement.
jackson-annotations is a non-optional dependency of jackson-databind - a
heavily used lib in Hadoop
https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.18.9/dependencies
Jackson-Databind is heavily dependent on annotations generally.
jetty-util-ajax serializes using toString results of classes while Jackson's
default behaviour is to write the class state as a JSON object. `@JsonValue` is
by far the most effective way to get Jackson-Databind to retain the existing
behaviour inherited from jetty-util-ajax.
> Drop use of jetty-util-ajax and use jackson instead
> ---------------------------------------------------
>
> Key: HADOOP-19951
> URL: https://issues.apache.org/jira/browse/HADOOP-19951
> Project: Hadoop Common
> Issue Type: Task
> Reporter: PJ Fanning
> Priority: Major
> Labels: pull-request-available
>
> Hadoop uses jetty-util-ajax in a few modules to read and write JSON.
> This is a part of HADOOP-19912 that can be split out and it doesn't cause the
> same issues with worrying about jar compatibilities - it actually simplifies
> the build by removing a direct dependency.
> The aim here is to reduce the number of ways that Hadoop works with JSON and
> Jackson is more commonly used in Hadoop than jetty-util-ajax.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]