Package org.apache.iceberg.flink.source
Class StreamingMonitorFunction
- java.lang.Object
 - 
- org.apache.flink.api.common.functions.AbstractRichFunction
 - 
- org.apache.flink.streaming.api.functions.source.RichSourceFunction<FlinkInputSplit>
 - 
- org.apache.iceberg.flink.source.StreamingMonitorFunction
 
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,org.apache.flink.streaming.api.checkpoint.CheckpointedFunction,org.apache.flink.streaming.api.functions.source.SourceFunction<FlinkInputSplit>
public class StreamingMonitorFunction extends org.apache.flink.streaming.api.functions.source.RichSourceFunction<FlinkInputSplit> implements org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
This is the single (non-parallel) monitoring task which takes aFlinkInputFormat, it is responsible for:- Monitoring snapshots of the Iceberg table.
 - Creating the 
splitscorresponding to the incremental files - Assigning them to downstream tasks for further processing.
 
The splits to be read are forwarded to the downstream
StreamingReaderOperatorwhich can have parallelism greater than one.- See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description StreamingMonitorFunction(TableLoader tableLoader, ScanContext scanContext) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()voidclose()voidinitializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)voidopen(org.apache.flink.configuration.Configuration parameters)voidrun(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<FlinkInputSplit> ctx)voidsnapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)- 
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
StreamingMonitorFunction
public StreamingMonitorFunction(TableLoader tableLoader, ScanContext scanContext)
 
 - 
 
- 
Method Detail
- 
open
public void open(org.apache.flink.configuration.Configuration parameters) throws java.lang.Exception- Specified by:
 openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
 openin classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
 java.lang.Exception
 
- 
initializeState
public void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) throws java.lang.Exception- Specified by:
 initializeStatein interfaceorg.apache.flink.streaming.api.checkpoint.CheckpointedFunction- Throws:
 java.lang.Exception
 
- 
snapshotState
public void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) throws java.lang.Exception- Specified by:
 snapshotStatein interfaceorg.apache.flink.streaming.api.checkpoint.CheckpointedFunction- Throws:
 java.lang.Exception
 
- 
run
public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<FlinkInputSplit> ctx) throws java.lang.Exception
- Specified by:
 runin interfaceorg.apache.flink.streaming.api.functions.source.SourceFunction<FlinkInputSplit>- Throws:
 java.lang.Exception
 
- 
cancel
public void cancel()
- Specified by:
 cancelin interfaceorg.apache.flink.streaming.api.functions.source.SourceFunction<FlinkInputSplit>
 
- 
close
public void close()
- Specified by:
 closein interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
 closein classorg.apache.flink.api.common.functions.AbstractRichFunction
 
 - 
 
 -