srowen commented on code in PR #37999:
URL: https://github.com/apache/spark/pull/37999#discussion_r981359490
##########
core/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala:
##########
@@ -39,11 +38,10 @@ import org.apache.spark.annotation.DeveloperApi
class ErrorClassesJsonReader(jsonFileURLs: Seq[URL]) {
assert(jsonFileURLs.nonEmpty)
+ private lazy val mapper = Utils.withScalaModuleMapper
Review Comment:
WOuldn't we want these in a companion object?
##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -1966,6 +1969,16 @@ private[spark] object Utils extends Logging {
getHadoopFileSystem(new URI(path), conf)
}
+ /**
+ * Return a new `ObjectMapper` with `ClassTagExtensions`.
+ * The mapper registers `DefaultScalaModule` by default.
+ */
+ def withScalaModuleMapper: ObjectMapper with ClassTagExtensions = {
Review Comment:
OK, don't know if we need to factor out a utility method just for this, I'd
be OK inlining this in the ~3 places it is used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]