本文整理了Java中org.apache.beam.sdk.Pipeline.validate()
方法的一些代码示例,展示了Pipeline.validate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pipeline.validate()
方法的具体详情如下:
包路径:org.apache.beam.sdk.Pipeline
类名称:Pipeline
方法名:validate
暂无
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
/**
* Runs this {@link Pipeline} using the given {@link PipelineOptions}, using the runner specified
* by the options.
*/
public PipelineResult run(PipelineOptions options) {
PipelineRunner<? extends PipelineResult> runner = PipelineRunner.fromOptions(options);
// Ensure all of the nodes are fully specified before a PipelineRunner gets access to the
// pipeline.
LOG.debug("Running {} via {}", this, runner);
try {
validate(options);
return runner.run(this);
} catch (UserCodeException e) {
// This serves to replace the stack with one that ends here and
// is caused by the caught UserCodeException, thereby splicing
// out all the stack frames in between the PipelineRunner itself
// and where the worker calls into the user's code.
throw new PipelineExecutionException(e.getCause());
}
}
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
@Test
public void testStableUniqueNameError() {
pipeline.getOptions().setStableUniqueNames(CheckEnabled.ERROR);
pipeline.apply(Create.of(5, 6, 7));
thrown.expectMessage("do not have stable unique names");
pipeline.apply(Create.of(5, 6, 7));
((Pipeline) pipeline).validate(pipeline.getOptions());
}
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
@Test
public void testStableUniqueNameWarning() {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline.getOptions().setStableUniqueNames(CheckEnabled.WARNING);
pipeline.apply(Create.of(5, 6, 7));
pipeline.apply(Create.of(5, 6, 7));
((Pipeline) pipeline).validate(pipeline.getOptions());
logged.verifyWarn("do not have stable unique names");
}
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
@Test
public void testStableUniqueNameOff() {
pipeline.enableAbandonedNodeEnforcement(false);
pipeline.getOptions().setStableUniqueNames(CheckEnabled.OFF);
pipeline.apply(Create.of(5, 6, 7));
pipeline.apply(Create.of(5, 6, 7));
((Pipeline) pipeline).validate(pipeline.getOptions());
logged.verifyNotLogged("do not have stable unique names");
}
内容来源于网络,如有侵权,请联系作者删除!