public static class PubsubIO.Write.Bound<T> extends PTransform<PCollection<T>,PDone>
| Modifier and Type | Class and Description |
|---|---|
class |
PubsubIO.Write.Bound.PubsubBoundedWriter
Writer to Pubsub which batches messages from bounded collections.
|
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 transform that's like this one but that publishes unique record IDs
to a message attribute with the specified name.
|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
PubsubIO.Write.Bound<T> |
timestampLabel(String timestampLabel)
Returns a new transform that's like this one but that publishes record timestamps
to a message attribute with the specified name.
|
PubsubIO.Write.Bound<T> |
topic(String topic)
Returns a new transform that's like this one but that writes to the specified
topic.
|
<X> PubsubIO.Write.Bound<X> |
withCoder(Coder<X> coder)
Returns a new transform that's like this one
but that uses the given
Coder to encode each of
the elements of the input PCollection into an
output record. |
getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validatepublic PubsubIO.Write.Bound<T> topic(String topic)
See PubsubIO.PubsubTopic.fromPath(String) for more details on the format of the
topic string.
Does not modify this object.
public PubsubIO.Write.Bound<T> timestampLabel(String timestampLabel)
PubsubIO.Write.timestampLabel(String) for more details.
Does not modify this object.
public PubsubIO.Write.Bound<T> idLabel(String idLabel)
PubsubIO.Write.idLabel(String)
for more details.
Does not modify this object.
public <X> PubsubIO.Write.Bound<X> withCoder(Coder<X> coder)
Coder to encode each of
the elements of the input PCollection 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).
apply in class PTransform<PCollection<T>,PDone>public void populateDisplayData(DisplayData.Builder builder)
PTransformpopulateDisplayData(DisplayData.Builder) is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData). Implementations may call
super.populateDisplayData(builder) in order to register display data in the current
namespace, but should otherwise use subcomponent.populateDisplayData(builder) to use
the namespace of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class PTransform<PCollection<T>,PDone>builder - The builder to populate with display data.HasDisplayDataprotected 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()