congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SourceFunction$SourceContext.markAsTemporarilyIdle
Code IndexAdd Tabnine to your IDE (free)

How to use
markAsTemporarilyIdle
method
in
org.apache.flink.streaming.api.functions.source.SourceFunction$SourceContext

Best Java code snippets using org.apache.flink.streaming.api.functions.source.SourceFunction$SourceContext.markAsTemporarilyIdle (Showing top 4 results out of 315)

origin: apache/flink

private void runIdle(SourceContext<Event> ctx) throws Exception {
  ctx.markAsTemporarilyIdle();
  // just wait until this source is canceled
  final Object waitLock = new Object();
  while (running) {
    try {
      //noinspection SynchronizationOnLocalVariableOrMethodParameter
      synchronized (waitLock) {
        waitLock.wait();
      }
    }
    catch (InterruptedException e) {
      if (!running) {
        // restore the interrupted state, and fall through the loop
        Thread.currentThread().interrupt();
      }
    }
  }
}
origin: apache/flink

sourceContext.markAsTemporarilyIdle();
origin: org.apache.flink/flink-connector-kafka-base

sourceContext.markAsTemporarilyIdle();
origin: org.apache.flink/flink-connector-kafka-base_2.11

sourceContext.markAsTemporarilyIdle();
org.apache.flink.streaming.api.functions.sourceSourceFunction$SourceContextmarkAsTemporarilyIdle

Javadoc

Marks the source to be temporarily idle. This tells the system that this source will temporarily stop emitting records and watermarks for an indefinite amount of time. This is only relevant when running on TimeCharacteristic#IngestionTime and TimeCharacteristic#EventTime, allowing downstream tasks to advance their watermarks without the need to wait for watermarks from this source while it is idle.

Source functions should make a best effort to call this method as soon as they acknowledge themselves to be idle. The system will consider the source to resume activity again once SourceContext#collect(T), SourceContext#collectWithTimestamp(T,long), or SourceContext#emitWatermark(Watermark) is called to emit elements or watermarks from the source.

Popular methods of SourceFunction$SourceContext

  • collect
    Emits one element from the source, without attaching a timestamp. In most cases, this is the default
  • getCheckpointLock
    Returns the checkpoint lock. Please refer to the class-level comment in SourceFunction for details a
  • emitWatermark
    Emits the given Watermark. A Watermark of value t declares that no elements with a timestamp t' late
  • collectWithTimestamp
    Emits one element from the source, and attaches the given timestamp. This method is relevant for pro
  • close
    This method is called by the system to shut down the context.

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now