首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用直接转轮在eclipse中调试数据流/Apache总线管道DoFn函数

如何使用直接转轮在eclipse中调试数据流/Apache总线管道DoFn函数
EN

Stack Overflow用户
提问于 2017-06-14 04:21:50
回答 1查看 2.7K关注 0票数 1

我希望在eclipse中使用直接转轮运行管道,并在DoFn函数和调试执行中放置一个断点。我尝试通过以下步骤设置直接运行程序:

  1. 添加直接转轮maven包

  1. 在pom.xml中为直接转轮设置maven配置文件。我的pom.xml有这份档案

<profiles> <profile> <id>direct-runner</id> <activation> <activeByDefault>true</activeByDefault> </activation> <dependencies> <dependency> <groupId>org.apache.beam</groupId> <artifactId>beam-runners-direct-java</artifactId> <version>0.2.0-incubating</version> </dependency> </dependencies> </profile> </profiles>

  1. 我的pom.xml中有插件管理下的pom.xml maven插件

<pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.4.0</version> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <cleanupDaemonThreads>false</cleanupDaemonThreads> <mainClass>com.MyMainClass</mainClass> </configuration> </plugin> </plugins> </pluginManagement>

  1. 下面是eclipse调试配置的屏幕截图。

当我使用上面的调试配置作业运行时,将在GCP数据流中启动,而不是本地JVM线程,并且我的断点永远不会被击中。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-14 04:46:02

可能是在测试方法中创建管道的方式。尝试使用TestPipeline util类创建管道,如下所示

代码语言:javascript
复制
public TestPipeline p = TestPipeline.create();
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44535374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档