0

我有一个以 mongodb 作为源的梁管道,但是当我尝试运行它时,它会引发异常。

An exception occured while executing the Java class. null: InvocationTargetException: org.apache.beam.sdk.io.BoundedSource.getDefaultOutputCoder()Lorg/apache/beam/sdk/coders/Coder

这是我在主函数中运行的代码片段

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();
4

1 回答 1

0

This happened because of different versions of mongo-io plugin and beam plugin

于 2017-08-14T07:08:08.130 回答