Class SparkReceiverIO.Read<V>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PBegin,PCollection<V>>
org.apache.beam.sdk.io.sparkreceiver.SparkReceiverIO.Read<V>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
SparkReceiverIO
A
PTransform
to read from Spark Receiver
.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransform
should be expanded on the givenInputT
.void
withGetOffsetFn
(SerializableFunction<V, Long> getOffsetFn) A function to get offset in order to startReceiver
from it.withPullFrequencySec
(Long pullFrequencySec) Delay in seconds between polling for new records updates.withSparkReceiverBuilder
(ReceiverBuilder<V, ? extends org.apache.spark.streaming.receiver.Receiver<V>> sparkReceiverBuilder) SetsReceiverBuilder
with value and custom SparkReceiver
class.withStartOffset
(Long startOffset) Inclusive start offset from which the reading should be started.withStartPollTimeoutSec
(Long startPollTimeoutSec) Waiting time after theReceiver
starts.withTimestampFn
(SerializableFunction<V, Instant> timestampFn) A function to calculate timestamp for a record.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
Read
public Read()
-
-
Method Details
-
withSparkReceiverBuilder
public SparkReceiverIO.Read<V> withSparkReceiverBuilder(ReceiverBuilder<V, ? extends org.apache.spark.streaming.receiver.Receiver<V>> sparkReceiverBuilder) SetsReceiverBuilder
with value and custom SparkReceiver
class. -
withGetOffsetFn
A function to get offset in order to startReceiver
from it. -
withTimestampFn
A function to calculate timestamp for a record. -
withPullFrequencySec
Delay in seconds between polling for new records updates. -
withStartPollTimeoutSec
Waiting time after theReceiver
starts. Required to prepare for polling. -
withStartOffset
Inclusive start offset from which the reading should be started. -
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PBegin,
PCollection<V>>
-
validateTransform
public void validateTransform()
-