Mirror of Apache Flink
Java Scala Python CoffeeScript HTML Shell
Switch branches/tags
Permalink
Failed to load latest commit information.
.github [build] Move GitHub specific files to '.github', update release script Aug 4, 2016
docs [FLINK-6365] [kinesis] Adapt default values of the Kinesis connector Jul 24, 2017
flink-annotations [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-clients [FLINK-6058] Don't read DEFAULT_PARALLELISM from GlobalConfiguration Jul 11, 2017
flink-connectors [FLINK-6365] [kinesis] Adapt default values of the Kinesis connector Jul 24, 2017
flink-contrib [FLINK-5541] Missing null check for localJar in FlinkSubmitter#submit… Jul 19, 2017
flink-core [FLINK-7225] [core] Fix exception message in StateDescriptor Jul 23, 2017
flink-dist [FLINK-7211] [build] Exclude Gelly javadoc jar from release Jul 24, 2017
flink-examples [FLINK-6539] Combine ReadFromKafka/WriteIntoKafka into one Kafka010Ex… Jul 24, 2017
flink-fs-tests [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-java [FLINK-7184] Activate checkstyle flink-java/hadoop Jul 18, 2017
flink-java8 [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-libraries [FLINK-7194] [table] Add default implementations for type hints to UD… Jul 21, 2017
flink-mesos [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-metrics [FLINK-7178] [metrics] Do not create separate shaded jars Jul 18, 2017
flink-optimizer [FLINK-7204] [core] CombineHint.NONE Jul 19, 2017
flink-quickstart [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-runtime-web [FLINK-7228] [history] Use free port in HistoryServerStaticFileServer… Jul 21, 2017
flink-runtime [hotfix] [tests] Code cleanups in ExecutionGraphRestartTest Jul 23, 2017
flink-scala-shell [FLINK-7058] Fix scala-2.10 dependencies Jul 18, 2017
flink-scala [FLINK-7058] Fix scala-2.10 dependencies Jul 18, 2017
flink-shaded-curator Update Flink version to 1.4-SNAPSHOT May 8, 2017
flink-shaded-hadoop [FLINK-6836] [tests] Fix YARNSessionCapacitySchedulerITCase to work w… Jun 21, 2017
flink-streaming-java [FLINK-6550] Reject null OutputTags in Context#collect(OutputTag<X>, X) Jul 18, 2017
flink-streaming-scala [FLINK-6902] Activate strict checkstyle for flink-streaming-scala Jul 13, 2017
flink-test-utils-parent [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-tests [FLINK-7102] improve ClassLoaderITCase Jul 19, 2017
flink-yarn-tests [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
flink-yarn [FLINK-6901] Make strict-checkstyle the default Jul 13, 2017
test-infra/end-to-end-test [FLINK-6539] Add automated Kafka end-to-end test Jul 24, 2017
tools [FLINK-6539] Run end-to-end tests on travis Jul 24, 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-5395] [Build System] support locally build distribution by scr… Jan 24, 2017
.travis.yml [FLINK-7047] [travis] Reorganize build profiles Jul 12, 2017
LICENSE [license] Update license with 'angular-drag-and-drop-lists' dependency Jan 25, 2017
NOTICE [hotfix] Update year in NOTICE file May 29, 2017
README.md Revert "[FLINK-6122] Add Travis build status to README" Mar 21, 2017
deploysettings.xml Updated all JobManager and TaskManager relevant test cases to work wi… Dec 18, 2014
pom.xml [FLINK-6539] Add automated batch WordCount end-to-end test Jul 24, 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.