public class InputElement extends Object implements Serializable
Constructor and Description |
---|
InputElement(String name)
Create new InputElement
|
Modifier and Type | Method and Description |
---|---|
InputElement |
addFileInput(String input)
Add a new file input
|
InputElement |
addKinesisInput(String input)
Add new Kinesis input
|
InputElement |
addPubsubInput(String input)
Add new Pubsub input
|
InputElement |
addWiredStream(org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<String>> s)
Add wired stream
|
org.apache.beam.sdk.values.PCollection<Event> |
expandElement(org.apache.beam.sdk.values.PBegin begin,
String project)
Expand configured input types into a resulting collection of parsed events
|
org.apache.beam.sdk.values.PCollection<String> |
expandElementRaw(org.apache.beam.sdk.values.PBegin begin,
String project)
Expand configured input types into a resulting collection of strings
|
static InputElement |
fromPipelineOptions(String name,
InputOptions options,
String cfgTickMessage)
Return an
InputElement given pipeline options |
EventFilter |
getEventFilter()
Get event filter
|
ArrayList<String> |
getFileInputs()
Get file inputs
|
ArrayList<String> |
getKinesisInputs()
Get Kinesis inputs
|
String |
getName()
Get element name
|
ParserCfg |
getParserConfiguration()
Get parser configuration
|
ArrayList<String> |
getPubsubInputs()
Get Pubsub inputs
|
InputElement |
setConfigurationTicks(String cfgTickMessage,
Integer cfgTickInterval,
long cfgTickMax)
Set configuration ticks for input element
|
InputElement |
setEventFilter(EventFilter filter)
Set event filter to use with parsed reads
|
void |
setFileInputs(ArrayList<String> fileInputs)
Set file inputs
|
void |
setKinesisInputs(ArrayList<String> kinesisInputs)
Set Kinesis inputs
|
void |
setParentInput(Input parent)
Set parent
Input object |
InputElement |
setParserConfiguration(ParserCfg parserCfg)
Set the parser configuration to use with parsed reads
|
void |
setPubsubInputs(ArrayList<String> pubsubInputs)
Set Pubsub inputs
|
public InputElement(String name)
name
- Name to associate with elementpublic static InputElement fromPipelineOptions(String name, InputOptions options, String cfgTickMessage)
InputElement
given pipeline options
This can be used to configure an input element using settings present in InputOptions.
name
- Name to associate with elementoptions
- Input optionscfgTickMessage
- Configuration tick message, null if not enabledpublic String getName()
public org.apache.beam.sdk.values.PCollection<String> expandElementRaw(org.apache.beam.sdk.values.PBegin begin, String project)
begin
- Pipeline begin using PBegin
project
- GCP project, set if using RuntimeSecretspublic org.apache.beam.sdk.values.PCollection<Event> expandElement(org.apache.beam.sdk.values.PBegin begin, String project)
begin
- Pipeline begin using PBegin
project
- GCP project, set if using RuntimeSecretspublic InputElement setParserConfiguration(ParserCfg parserCfg)
Specifies the parser configuration that will be used with the parser when the resulting
collection returned from the element is of type Event
.
parserCfg
- Parser configurationpublic ParserCfg getParserConfiguration()
public InputElement setEventFilter(EventFilter filter)
A valid parser configuration must be installed prior to calling this method.
filter
- EventFilter
public EventFilter getEventFilter()
public InputElement setConfigurationTicks(String cfgTickMessage, Integer cfgTickInterval, long cfgTickMax)
Note that although InputElement
is serializable to/from JSON, configuration ticks
are specifically excluded from this. If an input element is initialized from JSON and
configuration ticks are desired, these must be set manually.
cfgTickMessage
- JSON message string to usecfgTickInterval
- Tick interval in secondscfgTickMax
- Maximum number of ticks to generate before exitingpublic InputElement addWiredStream(org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<String>> s)
s
- Wired input transformpublic InputElement addFileInput(String input)
input
- File input pathpublic void setFileInputs(ArrayList<String> fileInputs)
fileInputs
- File inputspublic InputElement addPubsubInput(String input)
input
- Pubsub topicpublic void setPubsubInputs(ArrayList<String> pubsubInputs)
pubsubInputs
- Pubsub inputspublic InputElement addKinesisInput(String input)
input
- Kinesis input specificationpublic void setKinesisInputs(ArrayList<String> kinesisInputs)
kinesisInputs
- Kinesis inputspublic ArrayList<String> getKinesisInputs()
Copyright © 2022. All rights reserved.