在 Scala 中初始化 Apache Beam 测试管道失败

Sae*_*ham 3 java pipeline scala apache-beam

当我尝试运行测试管道时,它会引发错误

这是创建测试管道的源代码:

val p: TestPipeline = TestPipeline.create()
Run Code Online (Sandbox Code Playgroud)

这是错误:

java.lang.IllegalStateException:您的 TestPipeline 声明是否缺少 @Rule 注释?用法:@Rule public final Transient TestPipeline pipeline = TestPipeline.create();

Sae*_*ham 7

我已经通过以下代码解决了问题:

val p: TestPipeline = TestPipeline.create().enableAbandonedNodeEnforcement(false)
Run Code Online (Sandbox Code Playgroud)