-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-14222][BUILD] Remove jackson-module-scala dependency #12213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,6 @@ private[v1] class JacksonMessageWriter extends MessageBodyWriter[Object]{ | |
| super.writeValueAsString(t) | ||
| } | ||
| } | ||
| mapper.registerModule(com.fasterxml.jackson.module.scala.DefaultScalaModule) | ||
| mapper.enable(SerializationFeature.INDENT_OUTPUT) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added by @squito in #5940 in order to allow SparkStatusAPI POJOs to be serialized using Jackson. These POJOs are defined in https://github.com/apache/spark/blob/a4ead6d3881f071a2ae53ff1c961c6ac388cac1d/core/src/main/scala/org/apache/spark/status/api/v1/api.scala I wonder if the default values in the |
||
| mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL) | ||
| mapper.setDateFormat(JacksonMessageWriter.makeISODateFormat) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,6 @@ import scala.collection.JavaConverters._ | |
| import scala.collection.Map | ||
|
|
||
| import com.fasterxml.jackson.databind.ObjectMapper | ||
| import com.fasterxml.jackson.module.scala.DefaultScalaModule | ||
| import org.json4s.DefaultFormats | ||
| import org.json4s.JsonAST._ | ||
| import org.json4s.JsonDSL._ | ||
|
|
@@ -56,7 +55,7 @@ private[spark] object JsonProtocol { | |
|
|
||
| private implicit val format = DefaultFormats | ||
|
|
||
| private val mapper = new ObjectMapper().registerModule(DefaultScalaModule) | ||
| private val mapper = new ObjectMapper() | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added in #10061 in order to allow the new
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. /cc @carsonwang |
||
| /** ------------------------------------------------- * | ||
| * JSON serialization methods for SparkListenerEvents | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added by @andrewor14 in #5729 as part of the initial DAG visualization patch. Here, the only class that we serialize happens to be
RDDOperationScope, so I think this removal is addressed by the explicit@JsonPropertyannotations that I added above.Let me quickly double-check that the handling of
Optionis correct, though.