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 thisPTransformshould be expanded on the givenInputT.voidwithGetOffsetFn(SerializableFunction<V, Long> getOffsetFn) A function to get offset in order to startReceiverfrom 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) SetsReceiverBuilderwith value and custom SparkReceiverclass.withStartOffset(Long startOffset) Inclusive start offset from which the reading should be started.withStartPollTimeoutSec(Long startPollTimeoutSec) Waiting time after theReceiverstarts.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) SetsReceiverBuilderwith value and custom SparkReceiverclass. -
withGetOffsetFn
A function to get offset in order to startReceiverfrom it. -
withTimestampFn
A function to calculate timestamp for a record. -
withPullFrequencySec
Delay in seconds between polling for new records updates. -
withStartPollTimeoutSec
Waiting time after theReceiverstarts. Required to prepare for polling. -
withStartOffset
Inclusive start offset from which the reading should be started. -
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.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:
expandin classPTransform<PBegin,PCollection<V>>
-
validateTransform
public void validateTransform()
-