Class ImpulseSourceFunction

java.lang.Object
org.apache.beam.runners.flink.translation.functions.ImpulseSourceFunction
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>

public class ImpulseSourceFunction extends Object implements org.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
Source function which sends a single global impulse to a downstream operator. It may keep the source alive although its work is already done. It will only shutdown when the streaming job is cancelled.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.source.SourceFunction

    org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImpulseSourceFunction(long idleTimeoutMs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)
     
    void
    run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<WindowedValue<byte[]>> sourceContext)
     
    void
    snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImpulseSourceFunction

      public ImpulseSourceFunction(long idleTimeoutMs)
  • Method Details

    • run

      public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<WindowedValue<byte[]>> sourceContext) throws Exception
      Specified by:
      run in interface org.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>
      Throws:
      Exception
    • cancel

      public void cancel()
      Specified by:
      cancel in interface org.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>
    • snapshotState

      public void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
      Specified by:
      snapshotState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
    • initializeState

      public void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) throws Exception
      Specified by:
      initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
      Throws:
      Exception