Class SourceInputFormat<T>
java.lang.Object
org.apache.flink.api.common.io.RichInputFormat<WindowedValue<T>,SourceInputSplit<T>>
org.apache.beam.runners.flink.translation.wrappers.SourceInputFormat<T>
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.io.InputFormat<WindowedValue<T>,
,SourceInputSplit<T>> org.apache.flink.core.io.InputSplitSource<SourceInputSplit<T>>
public class SourceInputFormat<T>
extends org.apache.flink.api.common.io.RichInputFormat<WindowedValue<T>,SourceInputSplit<T>>
Wrapper for executing a
Source
as a Flink InputFormat
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSourceInputFormat
(String stepName, BoundedSource<T> initialSource, PipelineOptions options) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
configure
(org.apache.flink.configuration.Configuration configuration) createInputSplits
(int numSplits) org.apache.flink.core.io.InputSplitAssigner
getInputSplitAssigner
(SourceInputSplit[] sourceInputSplits) org.apache.flink.api.common.io.statistics.BaseStatistics
getStatistics
(org.apache.flink.api.common.io.statistics.BaseStatistics baseStatistics) nextRecord
(WindowedValue<T> t) void
open
(SourceInputSplit<T> sourceInputSplit) boolean
Methods inherited from class org.apache.flink.api.common.io.RichInputFormat
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
-
Constructor Details
-
SourceInputFormat
-
-
Method Details
-
configure
public void configure(org.apache.flink.configuration.Configuration configuration) -
open
- Throws:
IOException
-
getStatistics
public org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics baseStatistics) throws IOException - Throws:
IOException
-
createInputSplits
- Throws:
IOException
-
getInputSplitAssigner
public org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(SourceInputSplit[] sourceInputSplits) -
reachedEnd
public boolean reachedEnd() -
nextRecord
- Throws:
IOException
-
close
- Throws:
IOException
-