/** Indicates whether the given pipeline has any unbounded PCollections. */ private static boolean hasUnboundedPCollections(RunnerApi.Pipeline pipeline) { checkNotNull(pipeline); Collection<RunnerApi.PCollection> pCollecctions = pipeline.getComponents().getPcollectionsMap().values(); // Assume that all PCollections are consumed at some point in the pipeline. return pCollecctions .stream() .anyMatch(pc -> pc.getIsBounded() == RunnerApi.IsBounded.Enum.UNBOUNDED); } }
/** Indicates whether the given pipeline has any unbounded PCollections. */ private static boolean hasUnboundedPCollections(RunnerApi.Pipeline pipeline) { checkNotNull(pipeline); Collection<RunnerApi.PCollection> pCollecctions = pipeline.getComponents().getPcollectionsMap().values(); // Assume that all PCollections are consumed at some point in the pipeline. return pCollecctions .stream() .anyMatch(pc -> pc.getIsBounded() == RunnerApi.IsBounded.Enum.UNBOUNDED); } }
components.getPcollectionsOrThrow(String.format("foo.%s", localTimerName)); assertEquals( components.getPcollectionsOrThrow(mainInputId).getIsBounded(), timerPCollection.getIsBounded()); assertEquals( components.getPcollectionsOrThrow(mainInputId).getWindowingStrategyId(),
public static IsBounded isBounded(RunnerApi.PCollection pCollection) { return fromProto(pCollection.getIsBounded()); }
public static PCollection<?> fromProto( RunnerApi.PCollection pCollection, Pipeline pipeline, RehydratedComponents components) throws IOException { Coder<?> coder = components.getCoder(pCollection.getCoderId()); return PCollection.createPrimitiveOutputInternal( pipeline, components.getWindowingStrategy(pCollection.getWindowingStrategyId()), fromProto(pCollection.getIsBounded()), (Coder) coder); }