aws emr cluster flink不运行任何罐子,而是给出java.lang.nosuchmethoderror

发布于 2025-01-18 07:53:44 字数 520 浏览 2 评论 0原文

我尝试使用以下命令提交一个 jar 作为 AWS EMR 中的一个步骤:

aws emr add-steps --cluster-id j-XXXXXXXXX --steps Type=CUSTOM_JAR,Name=test-job,ActionOnFailure=CONTINUE,Jar=s3://xxxx/frauddetection-0.1.jar,Args=flink-yarn-session,-d

它是一个带有 Flink 1.14.2 和 JDK 8 的基本 EMR 集群 将其添加为步骤会出现错误:

java.lang.NoSuchMethodError:org.apache.commons.math3.stat.descriptive.rank.Percentile.withNaNStrategy

我检查了 Jar 和 apache commoms 库是否存在于其中。我本地机器上的JDK和Flink版本与EMR上的相同,并且jar在本地运行没有任何问题

I'm trying to submit a jar as a step in AWS EMR using the following command:

aws emr add-steps --cluster-id j-XXXXXXXXX --steps Type=CUSTOM_JAR,Name=test-job,ActionOnFailure=CONTINUE,Jar=s3://xxxx/frauddetection-0.1.jar,Args=flink-yarn-session,-d

It is a basic EMR cluster with Flink 1.14.2 and JDK 8
Adding this as a step gave the error:

java.lang.NoSuchMethodError:org.apache.commons.math3.stat.descriptive.rank.Percentile.withNaNStrategy

I checked the Jar and apache commoms library is present in it. JDK and Flink version on my local machine are the same as that on EMR and the jar runs without any issue locally

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安静被遗忘 2025-01-25 07:53:44

一种可能性是,AWS EMR 安装中包含不同(通常较旧)版本的 Apache Commons Math3 jar,因此这就是类路径上首先获取的内容。

您可以在构建 jar 时尝试对这些类进行着色。

One possibility is that a different (typically older) version of the Apache Commons Math3 jar is part of the AWS EMR installation, and so that's what is getting picked up first on the classpath.

You could try shading those classes when you build your jar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文