public class PubsubUnboundedSink extends PTransform<PCollection<PubsubMessage>,PDone>
GroupByKey followed by a ParDo which
publishes as a side effect. (In the future we want to design and switch to a custom
UnboundedSink implementation so as to gain access to system watermark and
end-of-pipeline cleanup.)
DoFn instances
to execute concurrently and hide latency.
name| Constructor and Description |
|---|
PubsubUnboundedSink(PubsubClient.PubsubClientFactory pubsubFactory,
ValueProvider<PubsubClient.TopicPath> topic,
String timestampAttribute,
String idAttribute,
int numShards) |
| Modifier and Type | Method and Description |
|---|---|
PDone |
expand(PCollection<PubsubMessage> input) |
String |
getIdAttribute()
Get the id attribute.
|
String |
getTimestampAttribute()
Get the timestamp attribute.
|
PubsubClient.TopicPath |
getTopic()
Get the topic being written to.
|
ValueProvider<PubsubClient.TopicPath> |
getTopicProvider()
Get the
ValueProvider for the topic being written to. |
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic PubsubUnboundedSink(PubsubClient.PubsubClientFactory pubsubFactory, ValueProvider<PubsubClient.TopicPath> topic, String timestampAttribute, String idAttribute, int numShards)
public PubsubClient.TopicPath getTopic()
public ValueProvider<PubsubClient.TopicPath> getTopicProvider()
ValueProvider for the topic being written to.public PDone expand(PCollection<PubsubMessage> input)
expand in class PTransform<PCollection<PubsubMessage>,PDone>Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.