Apache Flink
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Zakelly f5bcb6ff0d
[FLINK-35858][State] Default namespace in async state (#25135)
5 months ago
.github [FLINK-35961][release] Build 1.20 docs in GitHub Action and mark 1.20 as stable in docs 6 months ago
.idea [hotfix] Revert accidentally committed change to `.idea/vcx.xml` as part of f6d09c5c01 2 years ago
.mvn [FLINK-33501][ci] Makes use of Maven wrapper 1 year ago
docs [FLINK-35987][table] Add the built-in function ELT 5 months ago
flink-annotations [FLINK-35682][release] Add new version 2.0 and update GHA nightly build versions 7 months ago
flink-architecture-tests [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-clients [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-connectors [FLINK-35958][release] Generate reference data for state migration tests based on release-1.20.0 6 months ago
flink-container [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-contrib [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-core [FLINK-35887][core] Fix NPE in TypeExtractor where getSuperclass from an interface returns null 6 months ago
flink-core-api [FLINK-35812] Move tuple interfaces to flink-core-api (#25074) 6 months ago
flink-datastream [FLINK-35095][test] Fix unstable tests in `ExecutionEnvironmentImplTest` 6 months ago
flink-datastream-api [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-dist [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-dist-scala [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-docs [FLINK-35767][s3] Use s5cmd for fast files download from the s3 7 months ago
flink-dstl [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-end-to-end-tests [FLINK-35974][e2e] Use docker compose v2 for E2E tests 6 months ago
flink-examples [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-external-resources [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-filesystems [FLINK-35860][test] Fix S5CmdOnMinioITCase failed due to IllegalAccessError in JDK17/21 6 months ago
flink-formats [FLINK-35958][release] Generate reference data for state migration tests based on release-1.20.0 6 months ago
flink-fs-tests [FLINK-35958][release] Generate reference data for state migration tests based on release-1.20.0 6 months ago
flink-java [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-kubernetes [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-libraries [FLINK-35969][state] Remove deprecated dataset based API from State Processor API 6 months ago
flink-metrics [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-optimizer [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-python [FLINK-35987][table] Add the built-in function ELT 5 months ago
flink-queryable-state [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-quickstart [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-rpc [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-runtime [FLINK-35858][State] Default namespace in async state (#25135) 5 months ago
flink-runtime-web [FLINK-35227][rest] Remove execution-mode in ExecutionConfigInfo (#25080) 6 months ago
flink-scala [FLINK-35958][release] Generate reference data for state migration tests based on release-1.20.0 6 months ago
flink-state-backends [FLINK-35858][State] Default namespace in async state (#25135) 5 months ago
flink-streaming-java [FLINK-35858][State] Default namespace in async state (#25135) 5 months ago
flink-streaming-scala [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-table [FLINK-36003][table-planner] Add CompiledPlan annotations to BatchExecExpand and BatchExecSortAggregate 5 months ago
flink-test-utils-parent [FLINK-35887][core] Fix NPE in TypeExtractor where getSuperclass from an interface returns null 6 months ago
flink-tests [FLINK-36030][state / changelog] Don't use negative values in changelog recovery tests 5 months ago
flink-tests-java17 [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-walkthroughs [FLINK-35682][release] Update version to 2.0-SNAPSHOT 7 months ago
flink-yarn [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
flink-yarn-tests [FLINK-33705] Upgrade to flink-shaded 18.0 7 months ago
licenses [FLINK-21193][docs] Update licenses 4 years ago
tools [FLINK-35755] Upgrade to flink-shaded 19.0 7 months ago
.asf.yaml [hotfix][ci] Setup ML notifications for GHA 3 years ago
.editorconfig [FLINK-36026][table] Options from `OPTIONS` hint should be present in compiled plan 5 months ago
.git-blame-ignore-revs [FLINK-26553][build] Ignore scalafmt commit in .git-blame-ignore-revs 3 years ago
.gitignore [FLINK-32971][python] Add proper development version support in pyflink 1 year ago
.gitmodules [FLINK-21193][docs] Migrate Flink docs from Jekyll to Hugo 4 years ago
.scalafmt.conf [FLINK-26553][build] Add scalafmt for formatting the Scala codebase 3 years ago
LICENSE [FLINK-10987] Update source LICENSE & NOTICE files 6 years ago
NOTICE [hotfix] Update copyright NOTICE year to 2024 1 year ago
README.md [hotfix][doc] remove hive connector repo link because it is still WIP 1 year ago
azure-pipelines.yml Revert "[FLINK-34194][ci] Updates test CI container to be based on Ubuntu 22.04" 10 months ago
mvnw [FLINK-33503][build] Upgrading Maven wrapper from 3.1.0 to 3.2.0 1 year ago
mvnw.cmd [FLINK-33503][build] Upgrading Maven wrapper from 3.1.0 to 3.2.0 1 year ago
pom.xml [FLINK-35953][release] Update japicmp configuration for 1.20.0 6 months ago

README.md

Apache Flink

Apache Flink is an open source stream processing framework with powerful stream- and batch-processing capabilities.

Learn more about Flink at https://flink.apache.org/

Features

  • A streaming-first runtime that supports both batch processing and data streaming programs

  • Elegant and fluent APIs in Java and Scala

  • A runtime that supports very high throughput and low event latency at the same time

  • Support for event time and out-of-order processing in the DataStream API, based on the Dataflow Model

  • Flexible windowing (time, count, sessions, custom triggers) across different time semantics (event time, processing time)

  • Fault-tolerance with exactly-once processing guarantees

  • Natural back-pressure in streaming programs

  • Libraries for Graph processing (batch), Machine Learning (batch), and Complex Event Processing (streaming)

  • Built-in support for iterative programs (BSP) in the DataSet (batch) API

  • Custom memory management for efficient and robust switching between in-memory and out-of-core data processing algorithms

  • Compatibility layers for Apache Hadoop MapReduce

  • Integration with YARN, HDFS, HBase, and other components of the Apache Hadoop ecosystem

Streaming Example

case class WordWithCount(word: String, count: Long)

val text = env.socketTextStream(host, port, '\n')

val windowCounts = text.flatMap { w => w.split("\\s") }
  .map { w => WordWithCount(w, 1) }
  .keyBy("word")
  .window(TumblingProcessingTimeWindow.of(Time.seconds(5)))
  .sum("count")

windowCounts.print()

Batch Example

case class WordWithCount(word: String, count: Long)

val text = env.readTextFile(path)

val counts = text.flatMap { w => w.split("\\s") }
  .map { w => WordWithCount(w, 1) }
  .groupBy("word")
  .sum("count")

counts.writeAsCsv(outputPath)

Prerequisites for building Flink:

  • Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL)
  • Git
  • Maven (we require version 3.8.6)
  • Java 8 or 11 (Java 9 or 10 may work)
git clone https://github.com/apache/flink.git
cd flink
./mvnw clean package -DskipTests # this will take up to 10 minutes

Flink is now installed in build-target.

The Flink committers use IntelliJ IDEA to develop the Flink codebase. We recommend IntelliJ IDEA for developing projects that involve Scala code.

Minimal requirements for an IDE are:

  • Support for Java and Scala (also mixed projects)
  • Support for Maven with Java and Scala

IntelliJ IDEA

The IntelliJ IDE supports Maven out of the box and offers a plugin for Scala development.

Check out our Setting up IntelliJ guide for details.

Eclipse Scala IDE

NOTE: From our experience, this setup does not work with Flink due to deficiencies of the old Eclipse version bundled with Scala IDE 3.0.3 or due to version incompatibilities with the bundled Scala version in Scala IDE 4.4.1.

We recommend to use IntelliJ instead (see above)

Support

Dont hesitate to ask!

Contact the developers and community on the mailing lists if you need any help.

Open an issue if you find a bug in Flink.

Documentation

The documentation of Apache Flink is located on the website: https://flink.apache.org or in the docs/ directory of the source code.

Fork and Contribute

This is an active open-source project. We are always open to people who want to use the system or contribute to it. Contact us if you are looking for implementation tasks that fit your skills. This article describes how to contribute to Apache Flink.

Externalized Connectors

Most Flink connectors have been externalized to individual repos under the Apache Software Foundation:

About

Apache Flink is an open source project of The Apache Software Foundation (ASF). The Apache Flink project originated from the Stratosphere research project.