Apache Flink
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
.github [FLINK-7992][docs] extend the PR template asking for any S3 relation Nov 6, 2017
docs [FLINK-10157][State TTL] Allow `null` user values in map state with TTL Sep 21, 2018
flink-annotations Update version to 1.7-SNAPSHOT Jul 16, 2018
flink-clients [hotfix] Unstrip UndeclaredThrowableExceptions from entrypoints Sep 20, 2018
flink-connectors [FLINK-10358] fix NPE when running flink-kinesis connector against dy… Sep 20, 2018
flink-container [hotfix] Add --host and --executionMode config option to ClusterEntry… Sep 14, 2018
flink-contrib Update version to 1.7-SNAPSHOT Jul 16, 2018
flink-core [FLINK-10157][State TTL] Allow `null` user values in map state with TTL Sep 21, 2018
flink-dist [FLINK-10215]Add configuration of java option for historyserver Sep 17, 2018
flink-docs [FLINK-7551][rest] Add versioning Sep 3, 2018
flink-end-to-end-tests [FLINK-10269] [connectors] Fix Elasticsearch 6 UpdateRequest binary i… Sep 13, 2018
flink-examples [FLINK-7251] [types] Remove the flink-java8 module and improve lambda… Jul 20, 2018
flink-filesystems [FLINK-10366] [s3] Consolidate shared classes for S3 in flink-s3-fs-base Sep 19, 2018
flink-formats [FLINK-10170] [table] Add string representation for all Table & SQL A… Sep 11, 2018
flink-fs-tests [FLINK-10139][tests] Update compatibility tests for 1.6 Aug 20, 2018
flink-java [FLINK-10355] [java] Use 1-based field indexes in RowCsvInputFormat e… Sep 20, 2018
flink-jepsen [hotfix][tests] Add file sshd-run. Sep 20, 2018
flink-libraries [FLINK-9714][table] Support versioned joins with processing time Sep 21, 2018
flink-mesos [hotfix] Unstrip UndeclaredThrowableExceptions from entrypoints Sep 20, 2018
flink-metrics [FLINK-10082][metrics][slf4j] Provide initial size to StringBuilder Aug 20, 2018
flink-optimizer [FLINK-9562][optimizer] Fix typos/comments Aug 6, 2018
flink-queryable-state [FLINK-10116] [types] Fix getTotalFields() implementation of some Typ… Aug 16, 2018
flink-quickstart [FLINK-7251] [types] Remove the flink-java8 module and improve lambda… Jul 20, 2018
flink-runtime-web [hotfix][doc] Fix curl example in upload jar example Sep 20, 2018
flink-runtime [FLINK-10376][runtime] Use Files#createDirectories in BlobUtils Sep 24, 2018
flink-scala-shell Update version to 1.7-SNAPSHOT Jul 16, 2018
flink-scala [FLINK-10127] [core] Add TypeInformation for java.time.Instant. Aug 21, 2018
flink-shaded-curator Update version to 1.7-SNAPSHOT Jul 16, 2018
flink-shaded-hadoop Update version to 1.7-SNAPSHOT Jul 16, 2018
flink-state-backends [FLINK-10267][state] Fix arbitrary iterator access on RocksDBMapIterator Sep 11, 2018
flink-streaming-java [FLINK-9913][network] Serialize records only once for multi channel w… Sep 21, 2018
flink-streaming-scala [FLINK-10050][DataStream API] Support allowedLateness in CoGroupedStr… Sep 20, 2018
flink-test-utils-parent [FLINK-10042][state] (part 2) Refactoring of snapshot algorithms for … Aug 21, 2018
flink-tests [FLINK-9900][tests] Include more information on timeout in Zookeeper … Aug 20, 2018
flink-yarn-tests [hotfix] Move TestingYarnClusterDescriptor#TestJarFinder into YarnTes… Sep 23, 2018
flink-yarn [FLINK-9567][yarn] Before requesting new containers always check if i… Sep 20, 2018
tools [hotfix][checkstyle] Remove suppression for runtime/network.partition Sep 19, 2018
.editorconfig [tools] add more defaults to .editorconfig Nov 27, 2015
.gitattributes [FLINK-5485] [webfrontend] Mark compiled web frontend files as binary… Jan 16, 2017
.gitignore [FLINK-8994] [tests] Let general purpose DataStream job include Avro … Jul 30, 2018
.travis.yml [hotfix] Update Travis' Docker Compose version to 1.22.0 Aug 17, 2018
LICENSE [FLINK-9414] Remove unnecessary jline-reader and jline-terminal entri… May 22, 2018
NOTICE [FLINK-8359] [docs] Update copyright date in NOTICE Jan 5, 2018
README.md [hotfix] Update README.md building prerequisites Apr 30, 2018
deploysettings.xml Updated all JobManager and TaskManager relevant test cases to work wi… Dec 18, 2014
pom.xml [hotfix] Bump japicmp reference version to 1.6.1 Sep 20, 2018

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 http://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 and Apache Storm

  • 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")
  .timeWindow(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)

Building Apache Flink from Source

Prerequisites for building Flink:

  • Unix-like environment (we use Linux, Mac OS X, Cygwin)
  • git
  • Maven (we recommend version 3.2.5)
  • Java 8 (Java 9 and 10 are not yet supported)
git clone https://github.com/apache/flink.git
cd flink
mvn clean package -DskipTests # this will take up to 10 minutes

Flink is now installed in build-target

NOTE: Maven 3.3.x can build Flink, but will not properly shade away certain dependencies. Maven 3.0.3 creates the libraries properly. To build unit tests with Java 8, use Java 8u51 or above to prevent failures in unit tests that use the PowerMock runner.

Developing Flink

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

Don’t hesitate to ask!

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

Open an issue if you found a bug in Flink.

Documentation

The documentation of Apache Flink is located on the website: http://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.

About

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