public final class TestStream<T> extends PTransform<PBegin,PCollection<T>>
PCollection of elements, advancing the
watermark and processing time as elements are emitted. After all of the specified elements are
emitted, ceases to produce output.
Each call to a TestStream.Builder method will only be reflected in the state of the
Pipeline after each method before it has completed and no more progress can be made by
the Pipeline. A PipelineRunner must ensure that no more progress can be made in
the Pipeline before advancing the state of the TestStream.
| Modifier and Type | Class and Description |
|---|---|
static class |
TestStream.Builder<T>
An incomplete
TestStream. |
static class |
TestStream.ElementEvent<T>
A
TestStream.Event that produces elements. |
static interface |
TestStream.Event<T>
An event in a
TestStream. |
static class |
TestStream.EventType
The types of
TestStream.Event that are supported by TestStream. |
static class |
TestStream.ProcessingTimeEvent<T>
A
TestStream.Event that advances the processing time clock. |
static class |
TestStream.WatermarkEvent<T>
A
TestStream.Event that advances the watermark. |
name| Modifier and Type | Method and Description |
|---|---|
static <T> TestStream.Builder<T> |
create(Coder<T> coder)
Create a new
TestStream.Builder with no elements and watermark equal to BoundedWindow.TIMESTAMP_MIN_VALUE. |
PCollection<T> |
expand(PBegin input)
Applies this
PTransform on the given InputT, and returns its
Output. |
java.util.List<TestStream.Event<T>> |
getEvents()
Returns the sequence of
Events in this TestStream. |
Coder<T> |
getValueCoder() |
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic static <T> TestStream.Builder<T> create(Coder<T> coder)
TestStream.Builder with no elements and watermark equal to BoundedWindow.TIMESTAMP_MIN_VALUE.public PCollection<T> expand(PBegin input)
PTransformPTransform on the given InputT, and returns its
Output.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand in class PTransform<PBegin,PCollection<T>>public java.util.List<TestStream.Event<T>> getEvents()