Google Cloud Dataflow SDK for Java, version 1.9.1
Class Create.Values<T>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.PTransform<PInput,PCollection<T>>
-
- com.google.cloud.dataflow.sdk.transforms.Create.Values<T>
-
- All Implemented Interfaces:
- HasDisplayData, Serializable
- Direct Known Subclasses:
- Create.TimestampedValues
public static class Create.Values<T> extends PTransform<PInput,PCollection<T>>
APTransform
that creates aPCollection
from a set of in-memory objects.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform
name
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PCollection<T>
apply(PInput input)
Applies thisPTransform
on the givenInputT
, and returns itsOutput
.Coder<T>
getDefaultOutputCoder(PInput input)
Returns the defaultCoder
to use for the output of this single-outputPTransform
when applied to the given input.Iterable<T>
getElements()
Create.Values<T>
withCoder(Coder<T> coder)
Returns aCreate.Values
PTransform like this one that uses the givenCoder<T>
to decode each of the objects into a value of typeT
.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform
getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate
-
-
-
-
Method Detail
-
withCoder
public Create.Values<T> withCoder(Coder<T> coder)
Returns aCreate.Values
PTransform like this one that uses the givenCoder<T>
to decode each of the objects into a value of typeT
.By default,
Create.Values
can automatically determine theCoder
to use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistry
for details on how defaults are determined.Note that for
Create.Values
with no elements, theVoidCoder
is used.
-
apply
public PCollection<T> apply(PInput input)
Description copied from class:PTransform
Applies thisPTransform
on the givenInputT
, and returns itsOutput
.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).
The default implementation throws an exception. A derived class must either implement apply, or else each runner must supply a custom implementation via
PipelineRunner.apply(com.google.cloud.dataflow.sdk.transforms.PTransform<InputT, OutputT>, InputT)
.- Overrides:
apply
in classPTransform<PInput,PCollection<T>>
-
getDefaultOutputCoder
public Coder<T> getDefaultOutputCoder(PInput input) throws CannotProvideCoderException
Description copied from class:PTransform
Returns the defaultCoder
to use for the output of this single-outputPTransform
when applied to the given input.By default, always throws.
- Overrides:
getDefaultOutputCoder
in classPTransform<PInput,PCollection<T>>
- Throws:
CannotProvideCoderException
- if none can be inferred.
-
-