OUT - The type of the records produced by this source.SourceFunction API, which is due to be
removed. Use the new Source API instead.@Deprecated @Public public abstract class RichSourceFunction<OUT> extends org.apache.flink.api.common.functions.AbstractRichFunction implements SourceFunction<OUT>
AbstractRichFunction.getRuntimeContext()) and additional life-cycle methods (RichFunction.open(OpenContext) and
AbstractRichFunction.close().
This class is useful when implementing parallel sources where different parallel subtasks need to perform different work. Typical patterns for that are:
AbstractRichFunction.getRuntimeContext() to obtain the runtime context.
RuntimeContext.getTaskInfo() to determine
the current parallelism. It is strongly encouraged to use this method, rather than
hard-wiring the parallelism, because the configured parallelism may change depending on
program configuration. The parallelism may also change after recovering failures, when
fewer than desired parallel worker as available.
RuntimeContext.getTaskInfo()} to determine which subtask
the current instance of the function executes.
SourceFunction.SourceContext<T>| Constructor and Description |
|---|
RichSourceFunction()
Deprecated.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, runCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.