congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ExecutionConfig.setAutoWatermarkInterval
Code IndexAdd Tabnine to your IDE (free)

How to use
setAutoWatermarkInterval
method
in
org.apache.flink.api.common.ExecutionConfig

Best Java code snippets using org.apache.flink.api.common.ExecutionConfig.setAutoWatermarkInterval (Showing top 20 results out of 315)

origin: apache/flink

/**
 * Sets the time characteristic for all streams create from this environment, e.g., processing
 * time, event time, or ingestion time.
 *
 * <p>If you set the characteristic to IngestionTime of EventTime this will set a default
 * watermark update interval of 200 ms. If this is not applicable for your application
 * you should change it using {@link ExecutionConfig#setAutoWatermarkInterval(long)}.
 *
 * @param characteristic The time characteristic.
 */
@PublicEvolving
public void setStreamTimeCharacteristic(TimeCharacteristic characteristic) {
  this.timeCharacteristic = Preconditions.checkNotNull(characteristic);
  if (characteristic == TimeCharacteristic.ProcessingTime) {
    getConfig().setAutoWatermarkInterval(0);
  } else {
    getConfig().setAutoWatermarkInterval(200);
  }
}
origin: apache/flink

executionConfig.setAutoWatermarkInterval(watermarkInterval);
origin: apache/flink

sEnv.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
sEnv.enableCheckpointing(4000);
sEnv.getConfig().setAutoWatermarkInterval(1000);
origin: apache/flink

@Test
public void testNegativeTimestamps() throws Exception {
  final AssignerWithPeriodicWatermarks<Long> assigner = new NeverWatermarkExtractor();
  final TimestampsAndPeriodicWatermarksOperator<Long> operator =
      new TimestampsAndPeriodicWatermarksOperator<Long>(assigner);
  OneInputStreamOperatorTestHarness<Long, Long> testHarness =
      new OneInputStreamOperatorTestHarness<Long, Long>(operator);
  testHarness.getExecutionConfig().setAutoWatermarkInterval(50);
  testHarness.open();
  long[] values = { Long.MIN_VALUE, -1L, 0L, 1L, 2L, 3L, Long.MAX_VALUE };
  for (long value : values) {
    testHarness.processElement(new StreamRecord<>(value));
  }
  ConcurrentLinkedQueue<Object> output = testHarness.getOutput();
  for (long value: values) {
    assertEquals(value, ((StreamRecord<?>) output.poll()).getTimestamp());
  }
}
origin: apache/flink

public static void main(String[] args) throws Exception {
  ParameterTool params = ParameterTool.fromArgs(args);
  String outputPath = params.getRequired("outputPath");
  int recordsPerSecond = params.getInt("recordsPerSecond", 10);
  int duration = params.getInt("durationInSecond", 60);
  int offset = params.getInt("offsetInSecond", 0);
  StreamExecutionEnvironment sEnv = StreamExecutionEnvironment.getExecutionEnvironment();
  sEnv.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);
  sEnv.enableCheckpointing(4000);
  sEnv.getConfig().setAutoWatermarkInterval(1000);
  // execute a simple pass through program.
  PeriodicSourceGenerator generator = new PeriodicSourceGenerator(
    recordsPerSecond, duration, offset);
  DataStream<Tuple> rows = sEnv.addSource(generator);
  DataStream<Tuple> result = rows
    .keyBy(1)
    .timeWindow(Time.seconds(5))
    .sum(0);
  result.writeAsText(outputPath + "/result.txt", FileSystem.WriteMode.OVERWRITE)
    .setParallelism(1);
  sEnv.execute();
}
origin: apache/flink

env.getConfig().setAutoWatermarkInterval(10);
env.setParallelism(1);
env.getConfig().disableSysoutLogging();
origin: apache/flink

env.getConfig().setAutoWatermarkInterval(1);
env.setParallelism(2);
env.getConfig().disableSysoutLogging();
origin: apache/flink

env.getConfig().setAutoWatermarkInterval(1);
env.setParallelism(1);
env.getConfig().disableSysoutLogging();
origin: apache/flink

env.getConfig().setAutoWatermarkInterval(10);
env.setParallelism(2);
env.getConfig().disableSysoutLogging();
origin: apache/flink

env.getConfig().setAutoWatermarkInterval(10);
env.setParallelism(1);
env.getConfig().disableSysoutLogging();
origin: apache/flink

    new OneInputStreamOperatorTestHarness<>(operator);
testHarness.getExecutionConfig().setAutoWatermarkInterval(50);
origin: apache/flink

env.setParallelism(PARALLELISM);
env.setStreamTimeCharacteristic(timeCharacteristic);
env.getConfig().setAutoWatermarkInterval(10);
env.enableCheckpointing(100);
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, 0));
origin: apache/flink

env.setParallelism(PARALLELISM);
env.setStreamTimeCharacteristic(timeCharacteristic);
env.getConfig().setAutoWatermarkInterval(10);
env.enableCheckpointing(100);
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, 0));
origin: apache/flink

env.setParallelism(PARALLELISM);
env.setStreamTimeCharacteristic(timeCharacteristic);
env.getConfig().setAutoWatermarkInterval(10);
env.enableCheckpointing(100);
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, 0));
origin: apache/flink

env.setParallelism(PARALLELISM);
env.setStreamTimeCharacteristic(timeCharacteristic);
env.getConfig().setAutoWatermarkInterval(10);
env.enableCheckpointing(100);
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, 0));
origin: org.apache.flink/flink-streaming-java_2.11

/**
 * Sets the time characteristic for all streams create from this environment, e.g., processing
 * time, event time, or ingestion time.
 *
 * <p>If you set the characteristic to IngestionTime of EventTime this will set a default
 * watermark update interval of 200 ms. If this is not applicable for your application
 * you should change it using {@link ExecutionConfig#setAutoWatermarkInterval(long)}.
 *
 * @param characteristic The time characteristic.
 */
@PublicEvolving
public void setStreamTimeCharacteristic(TimeCharacteristic characteristic) {
  this.timeCharacteristic = Preconditions.checkNotNull(characteristic);
  if (characteristic == TimeCharacteristic.ProcessingTime) {
    getConfig().setAutoWatermarkInterval(0);
  } else {
    getConfig().setAutoWatermarkInterval(200);
  }
}
origin: DTStack/flinkx

/**
 * Sets the time characteristic for all streams create from this environment, e.g., processing
 * time, event time, or ingestion time.
 *
 * <p>If you set the characteristic to IngestionTime of EventTime this will set a default
 * watermark update interval of 200 ms. If this is not applicable for your application
 * you should change it using {@link ExecutionConfig#setAutoWatermarkInterval(long)}.
 *
 * @param characteristic The time characteristic.
 */
@PublicEvolving
public void setStreamTimeCharacteristic(TimeCharacteristic characteristic) {
  this.timeCharacteristic = Preconditions.checkNotNull(characteristic);
  if (characteristic == TimeCharacteristic.ProcessingTime) {
    getConfig().setAutoWatermarkInterval(0);
  } else {
    getConfig().setAutoWatermarkInterval(200);
  }
}
origin: org.apache.flink/flink-streaming-java_2.10

/**
 * Sets the time characteristic for all streams create from this environment, e.g., processing
 * time, event time, or ingestion time.
 *
 * <p>If you set the characteristic to IngestionTime of EventTime this will set a default
 * watermark update interval of 200 ms. If this is not applicable for your application
 * you should change it using {@link ExecutionConfig#setAutoWatermarkInterval(long)}.
 *
 * @param characteristic The time characteristic.
 */
@PublicEvolving
public void setStreamTimeCharacteristic(TimeCharacteristic characteristic) {
  this.timeCharacteristic = Preconditions.checkNotNull(characteristic);
  if (characteristic == TimeCharacteristic.ProcessingTime) {
    getConfig().setAutoWatermarkInterval(0);
  } else {
    getConfig().setAutoWatermarkInterval(200);
  }
}
origin: org.apache.flink/flink-streaming-java

/**
 * Sets the time characteristic for all streams create from this environment, e.g., processing
 * time, event time, or ingestion time.
 *
 * <p>If you set the characteristic to IngestionTime of EventTime this will set a default
 * watermark update interval of 200 ms. If this is not applicable for your application
 * you should change it using {@link ExecutionConfig#setAutoWatermarkInterval(long)}.
 *
 * @param characteristic The time characteristic.
 */
@PublicEvolving
public void setStreamTimeCharacteristic(TimeCharacteristic characteristic) {
  this.timeCharacteristic = Preconditions.checkNotNull(characteristic);
  if (characteristic == TimeCharacteristic.ProcessingTime) {
    getConfig().setAutoWatermarkInterval(0);
  } else {
    getConfig().setAutoWatermarkInterval(200);
  }
}
origin: seznam/euphoria

env.getConfig().setAutoWatermarkInterval(autoWatermarkInterval.toMillis());
org.apache.flink.api.commonExecutionConfigsetAutoWatermarkInterval

Javadoc

Sets the interval of the automatic watermark emission. Watermarks are used throughout the streaming system to keep track of the progress of time. They are used, for example, for time based windowing.

Popular methods of ExecutionConfig

  • <init>
  • isObjectReuseEnabled
    Returns whether object reuse has been enabled or disabled. @see #enableObjectReuse()
  • disableSysoutLogging
    Disables the printing of progress update messages to System.out
  • getAutoWatermarkInterval
    Returns the interval of the automatic watermark emission.
  • setGlobalJobParameters
    Register a custom, serializable user configuration object.
  • enableObjectReuse
    Enables reusing objects that Flink internally uses for deserialization and passing data to user-code
  • disableObjectReuse
    Disables reusing objects that Flink internally uses for deserialization and passing data to user-cod
  • getRestartStrategy
    Returns the restart strategy which has been set for the current job.
  • isSysoutLoggingEnabled
    Gets whether progress update messages should be printed to System.out
  • registerKryoType
    Registers the given type with the serialization stack. If the type is eventually serialized as a POJ
  • registerTypeWithKryoSerializer
    Registers the given Serializer via its class as a serializer for the given type at the KryoSerialize
  • setRestartStrategy
    Sets the restart strategy to be used for recovery. ExecutionConfig config = env.getConfig();
  • registerTypeWithKryoSerializer,
  • setRestartStrategy,
  • getParallelism,
  • addDefaultKryoSerializer,
  • getGlobalJobParameters,
  • getNumberOfExecutionRetries,
  • getRegisteredKryoTypes,
  • setParallelism,
  • getDefaultKryoSerializerClasses

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JPanel (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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