我有一个梁管道,它有mongodb作为源,但是当我尝试运行它时会引发异常。
An exception occured while executing the Java class. null: InvocationTargetException: org.apache.beam.sdk.io.BoundedSource.getDefaultOutputCoder()Lorg/apache/beam/sdk/coders/Coder
这是我在main函数
中运行的代码片段PipelineOptions options = PipelineOptionsFactory.create();
Pipeline p = Pipeline.create(options);
p.apply(MongoDbIO.read()
.withUri("mongodb://<IP address>:27017")
.withDatabase("<dbname>")
.withCollection("<collection_name>"));
p.run().waitUntilFinish();
答案 0 :(得分:0)
This happened because of different versions of mongo-io plugin and beam plugin