2017-08-11 103 views
0

我有一个有mongodb作为源的束流管道,但是当我尝试运行它时,它会抛出一个异常。Apache Beam 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(); 

回答

0

发生这种情况,因为不同版本蒙戈-io的插件和插件梁的