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.UnboundedReaderto read from this source, resuming from the given checkpoint if present.Returns aCoderfor encoding and decoding the checkpoints for this source.Returns theCoderto use for the data read from this source.getQueue()booleanReturns whether this source requires explicit deduping.split(int desiredNumSplits, PipelineOptions options) Returns a list ofUnboundedSourceobjects representing the instances of this source that should be used when executing the workflow.Methods inherited from class org.apache.beam.sdk.io.UnboundedSource
offsetBasedDeduplicationSupportedMethods 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:UnboundedSourceCreate a newUnboundedSource.UnboundedReaderto read from this source, resuming from the given checkpoint if present.- Specified by:
createReaderin classUnboundedSource<T,SolaceCheckpointMark>
-
split
public List<UnboundedSolaceSource<T>> split(int desiredNumSplits, PipelineOptions options) throws IOException Description copied from class:UnboundedSourceReturns a list ofUnboundedSourceobjects 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,
nidentical replicas of the top-level source can be returned.The size of the returned list should be as close to
desiredNumSplitsas possible, but does not have to match exactly. A low number of splits will limit the amount of parallelism in the source.- Specified by:
splitin classUnboundedSource<T,SolaceCheckpointMark> - Throws:
IOException
-
getCheckpointMarkCoder
Description copied from class:UnboundedSourceReturns aCoderfor encoding and decoding the checkpoints for this source.- Specified by:
getCheckpointMarkCoderin classUnboundedSource<T,SolaceCheckpointMark>
-
getOutputCoder
Description copied from class:SourceReturns theCoderto use for the data read from this source.- Overrides:
getOutputCoderin classSource<T>
-
requiresDeduping
public boolean requiresDeduping()Description copied from class:UnboundedSourceReturns 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:
requiresDedupingin classUnboundedSource<T,SolaceCheckpointMark>
-