public class MonitorFunction extends org.apache.flink.streaming.api.functions.source.RichSourceFunction<Split> implements org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.api.common.state.CheckpointListener
splits
corresponding to the incremental files
The splits to be read are forwarded to the downstream ReadOperator
which can have
parallelism greater than one.
Currently, there are two features that rely on this monitor:
Constructor and Description |
---|
MonitorFunction(ReadBuilder readBuilder,
long monitorInterval,
boolean emitSnapshotWatermark) |
Modifier and Type | Method and Description |
---|---|
static org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> |
buildSource(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env,
String name,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo,
ReadBuilder readBuilder,
long monitorInterval,
boolean emitSnapshotWatermark,
boolean shuffleBucketWithPartition,
BucketMode bucketMode) |
void |
cancel() |
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
void |
notifyCheckpointComplete(long checkpointId) |
void |
run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<Split> ctx) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext ctx) |
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MonitorFunction(ReadBuilder readBuilder, long monitorInterval, boolean emitSnapshotWatermark)
public void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) throws Exception
initializeState
in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
Exception
public void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext ctx) throws Exception
snapshotState
in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
Exception
public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<Split> ctx) throws Exception
public void notifyCheckpointComplete(long checkpointId)
notifyCheckpointComplete
in interface org.apache.flink.api.common.state.CheckpointListener
public void cancel()
cancel
in interface org.apache.flink.streaming.api.functions.source.SourceFunction<Split>
public static org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> buildSource(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, String name, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo, ReadBuilder readBuilder, long monitorInterval, boolean emitSnapshotWatermark, boolean shuffleBucketWithPartition, BucketMode bucketMode)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.