private static ExecutableStage createExecutableStage(Collection<SideInputReference> sideInputs) { Components components = Components.getDefaultInstance(); Environment environment = Environment.getDefaultInstance(); PCollectionNode inputCollection = PipelineNode.pCollection("collection-id", RunnerApi.PCollection.getDefaultInstance()); return ImmutableExecutableStage.of( components, environment, inputCollection, sideInputs, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }
private static ExecutableStage createExecutableStage(Collection<SideInputReference> sideInputs) { Components components = Components.getDefaultInstance(); Environment environment = Environment.getDefaultInstance(); PCollectionNode inputCollection = PipelineNode.pCollection("collection-id", RunnerApi.PCollection.getDefaultInstance()); return ImmutableExecutableStage.of( components, environment, inputCollection, sideInputs, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }
.setUrn("beam:composite")) .build(), Components.getDefaultInstance())); assertThat( pipeline.getComponents().getTransformsOrThrow("root").getSpec().getUrn(),
/** * Constructing a {@link QueryablePipeline} with components that reference absent {@link * RunnerApi.PCollection PCollections} should fail. */ @Test public void fromEmptyComponents() { // Not that it's hugely useful, but it shouldn't throw. QueryablePipeline p = QueryablePipeline.forPrimitivesIn(Components.getDefaultInstance()); assertThat(p.getRootTransforms(), emptyIterable()); }