Mirror of Apache Flink
Java Scala Python HTML CoffeeScript Shell Other
Permalink
Failed to load latest commit information.
.github [build] Move GitHub specific files to '.github', update release script Aug 4, 2016
docs [FLINK-5459] [docs] Add troubleshooting guide for classloading issues Jan 20, 2017
flink-annotations [build system] Update version to 1.3-SNAPSHOT Dec 20, 2016
flink-clients [FLINK-5543] [client] Add a comment to the code about adding a custom… Jan 19, 2017
flink-connectors [FLINK-5368] [kafka] Log msg if kafka topic doesn't have any partitions Jan 20, 2017
flink-contrib [FLINK-5468] [savepoints] Improve error message for migrating semi as… Jan 20, 2017
flink-core [FLINK-5549] [core] TypeExtractor fails with RuntimeException, but sh… Jan 20, 2017
flink-dist [FLINK-5364] [security] Rework JAAS configuration to support user-sup… Jan 11, 2017
flink-examples [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017
flink-fs-tests [FLINK-5432] recursively scan nested files in ContinuousFileMonitorin… Jan 19, 2017
flink-java [FLINK-5518] [hadoopCompat] Add null check to HadoopInputFormatBase.c… Jan 17, 2017
flink-java8 [build system] Update version to 1.3-SNAPSHOT Dec 20, 2016
flink-libraries [FLINK-5386] [table] Refactor window clause. Jan 20, 2017
flink-mesos [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017
flink-metrics [FLINK-4410] [runtime] Rework checkpoint stats tracking Jan 10, 2017
flink-optimizer [FLINK-2662] [optimizer] Fix translation of broadcasted unions. Jan 20, 2017
flink-quickstart [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017
flink-runtime-web Rebuild web-dashboard Jan 19, 2017
flink-runtime [FLINK-5585] [jobmanager] Fix NullPointerException in JobManager.upda… Jan 20, 2017
flink-scala-shell [build system] Update version to 1.3-SNAPSHOT Dec 20, 2016
flink-scala [FLINK-4920] Introduce Scala Function Gauge Jan 19, 2017
flink-shaded-curator [build system] Update version to 1.3-SNAPSHOT Dec 20, 2016
flink-shaded-hadoop [build system] Update version to 1.3-SNAPSHOT Dec 20, 2016
flink-streaming-java [FLINK-5507] [queryable state] Remove list variant of asQueryableState Jan 20, 2017
flink-streaming-scala [FLINK-5507] [queryable state] Remove list variant of asQueryableState Jan 20, 2017
flink-test-utils-parent [FLINK-5364] [security] Rework JAAS configuration to support user-sup… Jan 11, 2017
flink-tests [FLINK-5528] [tests] Reduce query retry delay in QueryableStateITCase Jan 20, 2017
flink-yarn-tests [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017
flink-yarn [FLINK-5580] [security] Fix path setting of shipped Kerberos keytabs … Jan 20, 2017
tools [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017
.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-5457] [docs] Add documentation for asynchronous I/O Jan 16, 2017
.travis.yml [FLINK-4895] Drop Hadoop1 support and remove related build infrastruc… Nov 30, 2016
LICENSE [FLINK-3719][web frontend] Moving the barrier between graph and stats Nov 30, 2016
NOTICE [FLINK-4221] Show metrics in WebFrontend + general improvements Nov 4, 2016
README.md [FLINK-5008] [docs] Update IDE setup and quickstart documentation. Dec 16, 2016
deploysettings.xml Updated all JobManager and TaskManager relevant test cases to work wi… Dec 18, 2014
pom.xml [FLINK-5519] [build] scala-maven-plugin version all change to 3.2.2 Jan 19, 2017

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) accross 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.0.4)
  • Java 7 or 8
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.