Apache flink 在EMR上使用flink纱线运行梁式管道

Apache flink 在EMR上使用flink纱线运行梁式管道,apache-flink,yarn,apache-beam,amazon-emr,Apache Flink,Yarn,Apache Beam,Amazon Emr,我正试图通过AWS EMR上的flink Thread会话从python SDK运行一个基本的wordcount beam管道。我使用了flink runner和portable runner,得到了下面列出的两个不同错误。这两种跑步者的作业都显示在flink UI中,并在我的笔记本电脑上通过本地flink会话成功运行 使用FlinkRunner,作业以BeamApp-hadoop-0617202523-14894e58运行,并给出错误: ERROR:root:java.lang.NoClass

我正试图通过AWS EMR上的flink Thread会话从python SDK运行一个基本的wordcount beam管道。我使用了flink runner和portable runner,得到了下面列出的两个不同错误。这两种跑步者的作业都显示在flink UI中,并在我的笔记本电脑上通过本地flink会话成功运行

使用FlinkRunner,作业以BeamApp-hadoop-0617202523-14894e58运行,并给出错误:

ERROR:root:java.lang.NoClassDefFoundError: Could not initialize class org.apache.beam.runners.core.construction.SerializablePipelineOptions
ERROR:root:java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule not a subtype
对于PortableRunner,作业以BeamApp-root-0617202248-36b0d306运行(我相信这意味着它正在从beam PortableRunner docker映像成功提交作业),并给出错误:

ERROR:root:java.lang.NoClassDefFoundError: Could not initialize class org.apache.beam.runners.core.construction.SerializablePipelineOptions
ERROR:root:java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule not a subtype
我假设这些是依赖性错误,并尝试在/usr/lib/flink/lib目录中获取提到的jar。纱线容器日志在应用程序启动时记录类路径时列出了正确的JAR,但错误仍然存在


Apache Beam版本2.22.0、flink版本1.10.0、emr版本5.30.0。

我在Apache Beam+AWS emr+flink中遇到了类似的问题,我通过从FlinkPipelineOptions.filesToStage中排除jackson core、jackson注释和jackson数据绑定依赖项解决了这个问题

options.setFilesToStage(Arrays.stream(System.getProperty("java.class.path").split(":"))
   .filter(d -> !d.contains("com.fasterxml.jackson.core"))
   .filter(d -> Files.exists(Paths.get(d)))
   .collect(Collectors.toList()));