aws emr cluster flink不运行任何罐子,而是给出java.lang.nosuchmethoderror
我尝试使用以下命令提交一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种可能性是,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.