Mirror of Apache Flink
Java Scala Python Shell CoffeeScript HTML
Switch branches/tags
Permalink
Failed to load latest commit information.
.github [FLINK-7992][docs] extend the PR template asking for any S3 relation Nov 6, 2017
docs [hotfix][metrics][docs] Remove unclosed highlight Dec 16, 2017
flink-annotations Update version to 1.5-SNAPSHOT Nov 6, 2017
flink-clients [FLINK-7974][QS] Wait for QS abstract server to shutdown. Dec 6, 2017
flink-connectors [FLINK-8213][metrics] Improve fallback behaviors Dec 12, 2017
flink-contrib [FLINK-8213][metrics] Improve fallback behaviors Dec 12, 2017
flink-core [FLINK-8264] [core] Add 'scala.' to the 'parent-first' classloading p… Dec 15, 2017
flink-dist [FLINK-8186] Exclude flink-avro from flink-dist; fix AvroUtils loading Dec 5, 2017
flink-docs [hotfix][docs] Exclude flink-docs from maven deployment Dec 7, 2017
flink-end-to-end-tests Update version to 1.5-SNAPSHOT Nov 6, 2017
flink-examples [FLINK-7998][examples] Fix TPCHQuery3 examples Nov 14, 2017
flink-filesystems [FLINK-8125] [core] Introduce limiting of outgoing file system connec… Nov 24, 2017
flink-formats [FLINK-8126] [build] Fix and update checkstyle Nov 22, 2017
flink-fs-tests [FLINK-7265] [core] Introduce FileSystemKind to differentiate between… Nov 17, 2017
flink-java [FLINK-7878] [api] make resource type extendible in ResourceSpec Dec 14, 2017
flink-java8 [FLINK-8084][build] Remove unnecessary japicmp pom entries Nov 22, 2017
flink-libraries [FLINK-8104] [table] Add ROW value constructor Dec 4, 2017
flink-mesos [FLINK-8120] [flip6] Register Yarn application with correct tracking URL Dec 14, 2017
flink-metrics [FLINK-8080][metrics] metrics.reporters now optional include list Dec 12, 2017
flink-optimizer [FLINK-7878] [api] make resource type extendible in ResourceSpec Dec 14, 2017
flink-queryable-state [hotfix] [tests] Speed up queryable state IT tests by removing sleep Dec 14, 2017
flink-quickstart [FLINK-8263] [quickstarts] Correctly set 'flink-core' to provided in … Dec 14, 2017
flink-runtime-web [FLINK-8213][metrics] Improve fallback behaviors Dec 12, 2017
flink-runtime [FLINK-7928] Move Resource out of ResourceSpec Dec 14, 2017
flink-scala-shell Update version to 1.5-SNAPSHOT Nov 6, 2017
flink-scala [FLINK-7928] Move Resource out of ResourceSpec Dec 14, 2017
flink-shaded-curator Update version to 1.5-SNAPSHOT Nov 6, 2017
flink-shaded-hadoop [FLINK-8196] [build] Remove 'javax.servlet' dependency exclusion. Dec 4, 2017
flink-streaming-java [FLINK-7878] [api] make resource type extendible in ResourceSpec Dec 14, 2017
flink-streaming-scala [FLINK-7765][build] Enable dependency convergence by default Nov 9, 2017
flink-test-utils-parent [FLINK-8126] [build] Fix and update checkstyle Nov 22, 2017
flink-tests [FLINK-7956] [flip6] Add support for queued scheduling with slot shar… Dec 14, 2017
flink-yarn-tests [FLINK-8161] [tests] Harden YARNSessionCapacitySchedulerITCase Nov 28, 2017
flink-yarn [FLINK-7928] [runtime] extend the resources in ResourceProfile for pr… Dec 14, 2017
test-infra/end-to-end-test [FLINK-7300] Ignore more exceptions in end-to-end tests Nov 29, 2017
tools [hotfix] Properly delete temp flink dir in create_source_release.sh Dec 6, 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-7420] [avro] Move all Avro code to flink-avro Nov 3, 2017
.travis.yml [FLINK-4228][yarn/s3] fix for yarn staging with s3a defaultFs Nov 18, 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 [hotfix] Remove "Java 7" from README.md Nov 27, 2017
deploysettings.xml Updated all JobManager and TaskManager relevant test cases to work wi… Dec 18, 2014
pom.xml [FLINK-8235][build] Spotbugs exclusion file path now absolute Dec 12, 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 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.