Class Create.WindowedValues<T>
- All Implemented Interfaces:
Serializable,HasDisplayData
PTransform that creates a PCollection whose elements have associated
windowing metadata.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransformshould be expanded on the givenInputT.Returns aCreate.WindowedValuesPTransform like this one that uses the givenCoder<T>to decode each of the objects into a value of typeT.withSchema(Schema schema, TypeDescriptor<T> typeDescriptor, SerializableFunction<T, Row> toRowFunction, SerializableFunction<Row, T> fromRowFunction) Returns aCreate.WindowedValuesPTransform like this one that uses the givenSchemato represent objects.withType(TypeDescriptor<T> type) Returns aCreate.WindowedValuesPTransform like this one that uses the givenTypeDescriptor<T>to determine theCoderto use to decode each of the objects into a value of typeT.withWindowCoder(Coder<? extends BoundedWindow> windowCoder) Returns aCreate.WindowedValuesPTransform like this one that uses the givenCoder<T>to decode each of the objects into a value of typeT.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
withCoder
Returns aCreate.WindowedValuesPTransform like this one that uses the givenCoder<T>to decode each of the objects into a value of typeT.By default,
Create.TimestampedValuescan automatically determine theCoderto use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistryfor details on how defaults are determined.Note that for
with no elements, theVoidCoderis used. -
withWindowCoder
Returns aCreate.WindowedValuesPTransform like this one that uses the givenCoder<T>to decode each of the objects into a value of typeT.By default,
Create.WindowedValuescan automatically determine theCoderto use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistryfor details on how defaults are determined.Note that for
with no elements, theGlobalWindow.Coderis used. -
withSchema
public Create.WindowedValues<T> withSchema(Schema schema, TypeDescriptor<T> typeDescriptor, SerializableFunction<T, Row> toRowFunction, SerializableFunction<Row, T> fromRowFunction) Returns aCreate.WindowedValuesPTransform like this one that uses the givenSchemato represent objects. -
withType
Returns aCreate.WindowedValuesPTransform like this one that uses the givenTypeDescriptor<T>to determine theCoderto use to decode each of the objects into a value of typeT. Note that a default coder must be registered for the class described in theTypeDescriptor<T>.By default,
Create.TimestampedValuescan automatically determine theCoderto use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistryfor details on how defaults are determined.Note that for
Create.WindowedValueswith no elements, theVoidCoderis used. -
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.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).
- Specified by:
expandin classPTransform<PBegin,PCollection<T>>
-