/** * Traverse the specified source {@link PTransform}, collecting {@link DisplayData} registered on * the inner primitive {@link PTransform PTransforms}. * * @param root The source root {@link PTransform} to traverse * @return the set of {@link DisplayData} for primitive source {@link PTransform PTransforms}. */ public Set<DisplayData> displayDataForPrimitiveSourceTransforms( final PTransform<? super PBegin, ? extends POutput> root) { Pipeline pipeline = Pipeline.create(options); pipeline.apply("SourceTransform", root); return displayDataForPipeline(pipeline, root); }
/** * Traverse the specified {@link PTransform}, collecting {@link DisplayData} registered on the * inner primitive {@link PTransform PTransforms}. * * @param root The root {@link PTransform} to traverse * @param inputCoder The coder to set for the {@link PTransform} input, or null to infer the * default coder. * @return the set of {@link DisplayData} for primitive {@link PTransform PTransforms}. */ public <InputT> Set<DisplayData> displayDataForPrimitiveTransforms( final PTransform<? super PCollection<InputT>, ? extends POutput> root, Coder<InputT> inputCoder) { Create.Values<InputT> input; if (inputCoder != null) { input = Create.empty(inputCoder); } else { // These types don't actually work, but the pipeline will never be run input = (Create.Values<InputT>) Create.empty(VoidCoder.of()); } Pipeline pipeline = Pipeline.create(options); pipeline.apply("Input", input).apply("Transform", root); return displayDataForPipeline(pipeline, root); }