我有一个以 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();