Package org.apache.beam.runners.spark.io
Class MicrobatchSource<T,CheckpointMarkT extends UnboundedSource.CheckpointMark> 
java.lang.Object
org.apache.beam.sdk.io.Source<T>
org.apache.beam.runners.spark.io.MicrobatchSource<T,CheckpointMarkT> 
- All Implemented Interfaces:
 Serializable,HasDisplayData
public class MicrobatchSource<T,CheckpointMarkT extends UnboundedSource.CheckpointMark> 
extends Source<T>
A 
Source that accommodates Spark's micro-batch oriented nature and wraps an UnboundedSource.- See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassMostly based onBoundedReadFromUnboundedSource'sUnboundedToBoundedSourceAdapter, with some adjustments for Spark specifics. - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidbooleangetId()getOrCreateReader(PipelineOptions options, CheckpointMarkT checkpointMark) Returns theCoderto use for the data read from this source.inthashCode()voidvalidate()Checks that this source is valid, before it can be used in a pipeline.Methods inherited from class org.apache.beam.sdk.io.Source
getDefaultOutputCoder, populateDisplayData 
- 
Method Details
- 
getOrCreateReader
public Source.Reader<T> getOrCreateReader(PipelineOptions options, CheckpointMarkT checkpointMark) throws IOException - Throws:
 IOException
 - 
validate
public void validate()Description copied from class:SourceChecks that this source is valid, before it can be used in a pipeline.It is recommended to use
Preconditionsfor implementing this method. - 
getOutputCoder
Description copied from class:SourceReturns theCoderto use for the data read from this source.- Overrides:
 getOutputCoderin classSource<T>
 - 
getCheckpointMarkCoder
 - 
getId
 - 
equals
 - 
hashCode
public int hashCode() - 
clearCache
public static void clearCache() 
 -