public static class Create.WindowedValues<T> extends PTransform<PBegin,PCollection<T>>
PTransform that creates a PCollection whose elements have associated
windowing metadata.annotations, displayData, name, resourceHints| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
expand(PBegin input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
Create.WindowedValues<T> |
withCoder(Coder<T> coder)
Returns a
Create.WindowedValues PTransform like this one that uses the given Coder<T> to decode each of the objects into a value of type T. |
Create.WindowedValues<T> |
withSchema(Schema schema,
TypeDescriptor<T> typeDescriptor,
SerializableFunction<T,Row> toRowFunction,
SerializableFunction<Row,T> fromRowFunction)
Returns a
Create.WindowedValues PTransform like this one that uses the given Schema to represent objects. |
Create.WindowedValues<T> |
withType(TypeDescriptor<T> type)
Returns a
Create.WindowedValues PTransform like this one that uses the given TypeDescriptor<T> to determine the Coder to use to decode each of the objects into a
value of type T. |
Create.WindowedValues<T> |
withWindowCoder(Coder<? extends BoundedWindow> windowCoder)
Returns a
Create.WindowedValues PTransform like this one that uses the given Coder<T> to decode each of the objects into a value of type T. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validatepublic Create.WindowedValues<T> withCoder(Coder<T> coder)
Create.WindowedValues PTransform like this one that uses the given Coder<T> to decode each of the objects into a value of type T.
By default, Create.TimestampedValues can automatically determine the Coder
to use if all elements have the same non-parameterized run-time class, and a default coder is
registered for that class. See CoderRegistry for details on how defaults are
determined.
Note that for with no elements, the VoidCoder is
used.
public Create.WindowedValues<T> withWindowCoder(Coder<? extends BoundedWindow> windowCoder)
Create.WindowedValues PTransform like this one that uses the given Coder<T> to decode each of the objects into a value of type T.
By default, Create.WindowedValues can automatically determine the Coder to
use if all elements have the same non-parameterized run-time class, and a default coder is
registered for that class. See CoderRegistry for details on how defaults are
determined.
Note that for with no elements, the GlobalWindow.Coder is used.
public Create.WindowedValues<T> withSchema(Schema schema, TypeDescriptor<T> typeDescriptor, SerializableFunction<T,Row> toRowFunction, SerializableFunction<Row,T> fromRowFunction)
Create.WindowedValues PTransform like this one that uses the given Schema to represent objects.public Create.WindowedValues<T> withType(TypeDescriptor<T> type)
Create.WindowedValues PTransform like this one that uses the given TypeDescriptor<T> to determine the Coder to use to decode each of the objects into a
value of type T. Note that a default coder must be registered for the class described
in the TypeDescriptor<T>.
By default, Create.TimestampedValues can automatically determine the Coder
to use if all elements have the same non-parameterized run-time class, and a default coder is
registered for that class. See CoderRegistry for details on how defaults are
determined.
Note that for Create.WindowedValues with no elements, the VoidCoder is
used.
public PCollection<T> expand(PBegin input)
PTransformPTransform should be expanded on the given
InputT.
NOTE: This method should not be called directly. Instead apply the PTransform should
be applied to the InputT using the apply method.
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>>