与Spark 2.4.0和EMR 5.26.0兼容JSON4S

编程入门 行业动态 更新时间:2024-10-14 20:20:08
本文介绍了与Spark 2.4.0和EMR 5.26.0兼容JSON4S的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 Spark json4s[java.lang.NoSuchMethodError: org.json4s.jackson.JsonMethods$.parse(Lorg/json4s/Js]

在AWS Emr上运行Spark Scala结构化流应用程序时,在解析复杂的json时遇到上述错误.

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

推荐答案

它看起来像是二进制兼容性错误...能否请您检查依赖树中是否存在json4s工件的不兼容版本?

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.

无论如何,我建议使用更安全高效的解析器,例如 jsoniter-scala (或基于它的 dijon ).

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

更多推荐

与Spark 2.4.0和EMR 5.26.0兼容JSON4S

本文发布于:2023-07-14 14:47:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1105115.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Spark   EMR   JSON4S

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!