public class StreamReadMonitoringFunction extends org.apache.flink.streaming.api.functions.source.RichSourceFunction<MergeOnReadInputSplit> implements org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
MergeOnReadInputSplit
, it is responsible for:
splits corresponding to those files.The splits to be read are forwarded to the downstream StreamReadOperator
which can have parallelism greater than one.
IMPORTANT NOTE: Splits are forwarded downstream for reading in ascending instant commits time order, in each downstream task, the splits are also read in receiving sequence. We do not ensure split consuming sequence among the downstream tasks.
| Constructor and Description |
|---|
StreamReadMonitoringFunction(org.apache.flink.configuration.Configuration conf,
org.apache.flink.core.fs.Path path,
org.apache.flink.table.types.logical.RowType rowType,
long maxCompactionMemoryInBytes,
PartitionPruners.PartitionPruner partitionPruner) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
close() |
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
void |
monitorDirAndForwardSplits(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<MergeOnReadInputSplit> context) |
void |
run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<MergeOnReadInputSplit> context) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) |
public StreamReadMonitoringFunction(org.apache.flink.configuration.Configuration conf,
org.apache.flink.core.fs.Path path,
org.apache.flink.table.types.logical.RowType rowType,
long maxCompactionMemoryInBytes,
@Nullable
PartitionPruners.PartitionPruner partitionPruner)
public void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)
throws Exception
initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionpublic void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<MergeOnReadInputSplit> context) throws Exception
run in interface org.apache.flink.streaming.api.functions.source.SourceFunction<MergeOnReadInputSplit>Exception@VisibleForTesting public void monitorDirAndForwardSplits(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<MergeOnReadInputSplit> context)
public void close()
throws Exception
close in interface org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void cancel()
cancel in interface org.apache.flink.streaming.api.functions.source.SourceFunction<MergeOnReadInputSplit>Copyright © 2023 The Apache Software Foundation. All rights reserved.