public static class PubsubIO.Write.Bound<T> extends PTransform<PCollection<T>,PDone>
PTransform that writes an unbounded PCollection<String>
to a PubSub stream.name| Modifier and Type | Method and Description |
|---|---|
PDone |
apply(PCollection<T> input)
Applies this
PTransform on the given InputT, and returns its
Output. |
Coder<T> |
getCoder() |
protected Coder<Void> |
getDefaultOutputCoder()
Returns the default
Coder to use for the output of this
single-output PTransform. |
String |
getIdLabel() |
String |
getTimestampLabel() |
PubsubIO.PubsubTopic |
getTopic() |
PubsubIO.Write.Bound<T> |
idLabel(String idLabel)
Returns a new PubsubIO.Write PTransform that's like this one but publishing record ids
to the given PubSub label.
|
PubsubIO.Write.Bound<T> |
named(String name)
Returns a new PubsubIO.Write PTransform that's like this one but with the given step
name.
|
PubsubIO.Write.Bound<T> |
timestampLabel(String timestampLabel)
Returns a new PubsubIO.Write PTransform that's like this one but publishing timestamps
to the given PubSub label.
|
PubsubIO.Write.Bound<T> |
topic(String topic)
Returns a new PubsubIO.Write PTransform that's like this one but writing to the given
topic.
|
<X> PubsubIO.Write.Bound<X> |
withCoder(Coder<X> coder)
Returns a new PubsubIO.Write PTransform that's like this one
but that uses the given
Coder<X> to encode each of
the elements of the input PCollection<X> into an
output record. |
getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validatepublic PubsubIO.Write.Bound<T> named(String name)
public PubsubIO.Write.Bound<T> topic(String topic)
public PubsubIO.Write.Bound<T> timestampLabel(String timestampLabel)
public PubsubIO.Write.Bound<T> idLabel(String idLabel)
public <X> PubsubIO.Write.Bound<X> withCoder(Coder<X> coder)
Coder<X> to encode each of
the elements of the input PCollection<X> into an
output record. Does not modify this object.X - the type of the elements of the input PCollectionpublic PDone apply(PCollection<T> 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).
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).
apply in class PTransform<PCollection<T>,PDone>protected Coder<Void> getDefaultOutputCoder()
PTransformCoder to use for the output of this
single-output PTransform.
By default, always throws
getDefaultOutputCoder in class PTransform<PCollection<T>,PDone>public PubsubIO.PubsubTopic getTopic()
public String getTimestampLabel()
public String getIdLabel()