Class UnboundedSolaceSource<T>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.io.UnboundedSource
UnboundedSource.CheckpointMark, UnboundedSource.UnboundedReader<OutputT>
Nested classes/interfaces inherited from class org.apache.beam.sdk.io.Source
Source.Reader<T>
-
Constructor Summary
ConstructorsConstructorDescriptionUnboundedSolaceSource
(Queue queue, SempClientFactory sempClientFactory, SessionServiceFactory sessionServiceFactory, @Nullable Integer maxNumConnections, boolean enableDeduplication, Coder<T> coder, SerializableFunction<T, Instant> timestampFn, Duration watermarkIdleDurationThreshold, SerializableFunction<@Nullable BytesXMLMessage, @Nullable T> parseFn) -
Method Summary
Modifier and TypeMethodDescriptioncreateReader
(PipelineOptions options, @Nullable SolaceCheckpointMark checkpointMark) Create a newUnboundedSource.UnboundedReader
to read from this source, resuming from the given checkpoint if present.Returns aCoder
for encoding and decoding the checkpoints for this source.Returns theCoder
to use for the data read from this source.getQueue()
boolean
Returns whether this source requires explicit deduping.split
(int desiredNumSplits, PipelineOptions options) Returns a list ofUnboundedSource
objects representing the instances of this source that should be used when executing the workflow.Methods inherited from class org.apache.beam.sdk.io.UnboundedSource
offsetBasedDeduplicationSupported
Methods inherited from class org.apache.beam.sdk.io.Source
getDefaultOutputCoder, populateDisplayData, validate
-
Constructor Details
-
UnboundedSolaceSource
public UnboundedSolaceSource(Queue queue, SempClientFactory sempClientFactory, SessionServiceFactory sessionServiceFactory, @Nullable Integer maxNumConnections, boolean enableDeduplication, Coder<T> coder, SerializableFunction<T, Instant> timestampFn, Duration watermarkIdleDurationThreshold, SerializableFunction<@Nullable BytesXMLMessage, @Nullable T> parseFn)
-
-
Method Details
-
getQueue
-
getSessionServiceFactory
-
getSempClientFactory
-
getTimestampFn
-
getWatermarkIdleDurationThreshold
-
getParseFn
-
createReader
public UnboundedSource.UnboundedReader<T> createReader(PipelineOptions options, @Nullable SolaceCheckpointMark checkpointMark) Description copied from class:UnboundedSource
Create a newUnboundedSource.UnboundedReader
to read from this source, resuming from the given checkpoint if present.- Specified by:
createReader
in classUnboundedSource<T,
SolaceCheckpointMark>
-
split
public List<UnboundedSolaceSource<T>> split(int desiredNumSplits, PipelineOptions options) throws IOException Description copied from class:UnboundedSource
Returns a list ofUnboundedSource
objects representing the instances of this source that should be used when executing the workflow. Each split should return a separate partition of the input data.For example, for a source reading from a growing directory of files, each split could correspond to a prefix of file names.
Some sources are not splittable, such as reading from a single TCP stream. In that case, only a single split should be returned.
Some data sources automatically partition their data among readers. For these types of inputs,
n
identical replicas of the top-level source can be returned.The size of the returned list should be as close to
desiredNumSplits
as possible, but does not have to match exactly. A low number of splits will limit the amount of parallelism in the source.- Specified by:
split
in classUnboundedSource<T,
SolaceCheckpointMark> - Throws:
IOException
-
getCheckpointMarkCoder
Description copied from class:UnboundedSource
Returns aCoder
for encoding and decoding the checkpoints for this source.- Specified by:
getCheckpointMarkCoder
in classUnboundedSource<T,
SolaceCheckpointMark>
-
getOutputCoder
Description copied from class:Source
Returns theCoder
to use for the data read from this source.- Overrides:
getOutputCoder
in classSource<T>
-
requiresDeduping
public boolean requiresDeduping()Description copied from class:UnboundedSource
Returns whether this source requires explicit deduping.This is needed if the underlying data source can return the same record multiple times, such a queuing system with a pull-ack model. Sources where the records read are uniquely identified by the persisted state in the CheckpointMark do not need this.
Generally, if
UnboundedSource.CheckpointMark.finalizeCheckpoint()
is overridden, this method should return true. Checkpoint finalization is best-effort, and readers can be resumed from a checkpoint that has not been finalized.- Overrides:
requiresDeduping
in classUnboundedSource<T,
SolaceCheckpointMark>
-