is JSON4S compatible with spark 2.4.0 and EMR 5.26.0

♀尐吖头ヾ 提交于 2019-12-13 17:49:26

问题


Spark json4s[java.lang.NoSuchMethodError: 
org.json4s.jackson.JsonMethods$.parse(Lorg/json4s/Js]

Getting above error while parsing complex json when running spark scala structured streaming application on aws emr.


回答1:


It looks like a binary compatibility error... Could you please check the dependency tree for incompatible versions of json4s artifacts?

If you will not able to upgrade them to use the same version then possible you can solve the problem by shading some of them with sbt-assembly plugin using rules like these.

In any case I would recommend to use more safe and efficient parser like jsoniter-scala (or dijon that is based on it).



来源:https://stackoverflow.com/questions/57660602/is-json4s-compatible-with-spark-2-4-0-and-emr-5-26-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!