Package org.apache.beam.runners.spark.io
Class SparkUnboundedSource
- java.lang.Object
-
- org.apache.beam.runners.spark.io.SparkUnboundedSource
-
public class SparkUnboundedSource extends java.lang.ObjectA "composite" InputDStream implementation forUnboundedSources.This read is a composite of the following steps:
- Create a single-element (per-partition) stream, that contains the (partitioned)
Sourceand an optionalUnboundedSource.CheckpointMarkto start from. - Read from within a stateful operation
JavaPairDStream.mapWithState(StateSpec)using theStateSpecFunctions.mapSourceFunction(org.apache.beam.runners.core.construction.SerializablePipelineOptions, java.lang.String)mapping function, which manages the state of the CheckpointMark per partition. - Since the stateful operation is a map operation, the read iterator needs to be flattened, while reporting the properties of the read (such as number of records) to the tracker.
- Create a single-element (per-partition) stream, that contains the (partitioned)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSparkUnboundedSource.MetadataA metadata holder for an input stream partition.
-
Constructor Summary
Constructors Constructor Description SparkUnboundedSource()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,CheckpointMarkT extends org.apache.beam.sdk.io.UnboundedSource.CheckpointMark>
UnboundedDataset<T>read(org.apache.spark.streaming.api.java.JavaStreamingContext jssc, org.apache.beam.runners.core.construction.SerializablePipelineOptions rc, org.apache.beam.sdk.io.UnboundedSource<T,CheckpointMarkT> source, java.lang.String stepName)
-
-
-
Method Detail
-
read
public static <T,CheckpointMarkT extends org.apache.beam.sdk.io.UnboundedSource.CheckpointMark> UnboundedDataset<T> read(org.apache.spark.streaming.api.java.JavaStreamingContext jssc, org.apache.beam.runners.core.construction.SerializablePipelineOptions rc, org.apache.beam.sdk.io.UnboundedSource<T,CheckpointMarkT> source, java.lang.String stepName)
-
-