Codota Logo
SourceFunction$SourceContext.markAsTemporarilyIdle
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getApplicationContext (Context)
  • String (java.lang)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now