public class PubsubFileInjector extends Object
This is useful for testing streaming pipelines. Note that since batch pipelines might retry chunks, this does _not_ guarantee exactly-once injection of file data. Some lines may be published multiple times.
| Modifier and Type | Class and Description |
|---|---|
static class |
PubsubFileInjector.Bound
A DoFn that publishes non-empty lines to Google Cloud PubSub.
|
static class |
PubsubFileInjector.Unbound
An incomplete
PubsubFileInjector transform with unbound output topic. |
| Constructor and Description |
|---|
PubsubFileInjector() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
Sets up and starts streaming pipeline.
|
static PubsubFileInjector.Bound |
publish(String outputTopic)
Creates a
PubsubFileInjector transform that publishes to the given output topic. |
static PubsubFileInjector.Unbound |
withTimestampLabelKey(String timestampLabelKey)
Creates a
PubsubFileInjector transform with the given timestamp label key. |
public static PubsubFileInjector.Unbound withTimestampLabelKey(String timestampLabelKey)
PubsubFileInjector transform with the given timestamp label key.public static PubsubFileInjector.Bound publish(String outputTopic)
PubsubFileInjector transform that publishes to the given output topic.public static void main(String[] args)