Annotate internal methods on Pipeline
Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/362d0be7 Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/362d0be7 Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/362d0be7 Branch: refs/heads/master Commit: 362d0be79222ad67f1639d54434c1505ef76752b Parents: 58298d8 Author: Kenneth Knowles <[email protected]> Authored: Wed May 3 10:13:15 2017 -0700 Committer: Kenneth Knowles <[email protected]> Committed: Thu May 4 06:09:33 2017 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/beam/sdk/Pipeline.java | 29 +++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/362d0be7/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java ---------------------------------------------------------------------- diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java index 351e1b8..6b15f0d 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java @@ -28,6 +28,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.beam.sdk.annotations.Internal; import org.apache.beam.sdk.coders.CoderRegistry; import org.apache.beam.sdk.io.Read; import org.apache.beam.sdk.options.PipelineOptions; @@ -190,12 +191,15 @@ public class Pipeline { } /** - * Replaces all nodes that match a {@link PTransformOverride} in this pipeline. Overrides are + * <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> + * + * <p>Replaces all nodes that match a {@link PTransformOverride} in this pipeline. Overrides are * applied in the order they are present within the list. * * <p>After all nodes are replaced, ensures that no nodes in the updated graph match any of the * overrides. */ + @Internal public void replaceAll(List<PTransformOverride> overrides) { for (PTransformOverride override : overrides) { replace(override); @@ -334,10 +338,12 @@ public class Pipeline { } /** - * A {@link PipelineVisitor} can be passed into - * {@link Pipeline#traverseTopologically} to be called for each of the - * transforms and values in the {@link Pipeline}. + * <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> + * + * <p>A {@link PipelineVisitor} can be passed into {@link Pipeline#traverseTopologically} to be + * called for each of the transforms and values in the {@link Pipeline}. */ + @Internal public interface PipelineVisitor { /** * Called for each composite transform after all topological predecessors have been visited @@ -396,7 +402,9 @@ public class Pipeline { } /** - * Invokes the {@link PipelineVisitor PipelineVisitor's} + * <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> + * + * <p>Invokes the {@link PipelineVisitor PipelineVisitor's} * {@link PipelineVisitor#visitPrimitiveTransform} and * {@link PipelineVisitor#visitValue} operations on each of this * {@link Pipeline Pipeline's} transform and value nodes, in forward @@ -408,14 +416,18 @@ public class Pipeline { * * <p>Typically invoked by {@link PipelineRunner} subclasses. */ + @Internal public void traverseTopologically(PipelineVisitor visitor) { transforms.visit(visitor); } /** - * Like {@link #applyTransform(String, PInput, PTransform)} but defaulting to the name + * <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> + * + * <p>Like {@link #applyTransform(String, PInput, PTransform)} but defaulting to the name * provided by the {@link PTransform}. */ + @Internal public static <InputT extends PInput, OutputT extends POutput> OutputT applyTransform(InputT input, PTransform<? super InputT, OutputT> transform) { @@ -423,7 +435,9 @@ public class Pipeline { } /** - * Applies the given {@code PTransform} to this input {@code InputT} and returns + * <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> + * + * <p>Applies the given {@code PTransform} to this input {@code InputT} and returns * its {@code OutputT}. This uses {@code name} to identify this specific application * of the transform. This name is used in various places, including the monitoring UI, * logging, and to stably identify this application node in the {@link Pipeline} graph during @@ -432,6 +446,7 @@ public class Pipeline { * <p>Each {@link PInput} subclass that provides an {@code apply} method should delegate to * this method to ensure proper registration with the {@link PipelineRunner}. */ + @Internal public static <InputT extends PInput, OutputT extends POutput> OutputT applyTransform(String name, InputT input, PTransform<? super InputT, OutputT> transform) {
