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
Florian Schmidt d80f263f2e [FLINK-9638][E2E Tests] Add helper script to run single test
This commit adds a helper script `run-single-test.sh` that allows you to run
a single test in the context of the text runner.

This provides you with
* Setup of ENV variables
* cleanup after test
* Nicer output

Usage: ./run-single-test.sh <path-to-test-script> [<arg1> <arg2> ...]

This closes #6197.
7 years ago
.github [FLINK-7992][docs] extend the PR template asking for any S3 relation 7 years ago
docs [hotfix] [docs] Fix a typo in index.md 7 years ago
flink-annotations [FLINK-8744][docs] Add CommonOption annotation 7 years ago
flink-clients [FLINK-8573] Extend ProgramInvocationException message with Job ID where applicable 7 years ago
flink-connectors [FLINK-8944] [Kinesis Connector] Use listShards instead of DescribeStream for shard discovery as it offer higher rate limits 7 years ago
flink-contrib [FLINK-9464] Remove version and scope from flink-test-utils-junit dependency in multiple modules 7 years ago
flink-core [FLINK-9623][runtime] Move zipping logic out of blobservice 7 years ago
flink-dist [FLINK-9464] Remove version and scope from flink-test-utils-junit dependency in multiple modules 7 years ago
flink-docs [FLINK-8744][docs] Add CommonOption annotation 7 years ago
flink-end-to-end-tests [FLINK-9638][E2E Tests] Add helper script to run single test 7 years ago
flink-examples [FLINK-9136][tests] Remove StreamingProgramTestBase 7 years ago
flink-filesystems [FLINK-9464] Remove version and scope from flink-test-utils-junit and maven-shade-plugin in flink-swift-fs-hadoop pom.xml 7 years ago
flink-formats [FLINK-9464] Remove version and scope from flink-test-utils-junit in flink-json pom.xml 7 years ago
flink-fs-tests [FLINK-9366] DistributedCache works with Distributed File System 7 years ago
flink-java [FLINK-9366] DistributedCache works with Distributed File System 7 years ago
flink-java8 [FLINK-9292] [core] Remove TypeInfoParser (part 1) 7 years ago
flink-libraries [FLINK-9579][CEP]Remove unneeded clear on elementQueueState 7 years ago
flink-mesos [FLINK-9386] Embed netty router 7 years ago
flink-metrics [FLINK-9464] Remove version and scope from flink-test-utils-junit dependency in multiple modules 7 years ago
flink-optimizer [FLINK-9623][runtime] Move zipping logic out of blobservice 7 years ago
flink-queryable-state [FLINK-9571] Repace StateBinder with internal backend-specific state factories 7 years ago
flink-quickstart [FLINK-9472] fix archetype documentation typo 7 years ago
flink-runtime [FLINK-9599][rest] Implement generic mechanism to access uploaded files 7 years ago
flink-runtime-web [FLINK-9599][rest] Implement generic mechanism to access uploaded files 7 years ago
flink-scala [FLINK-9366] DistributedCache works with Distributed File System 7 years ago
flink-scala-shell [FLINK-8795] Fixed local scala shell for Flip6 7 years ago
flink-shaded-curator Update version to 1.6-SNAPSHOT 7 years ago
flink-shaded-hadoop [FLINK-7850][build] Add activation property to maven profiles 7 years ago
flink-state-backends [FLINK-9571] Repace StateBinder with internal backend-specific state factories 7 years ago
flink-streaming-java [FLINK-9467][metrics][WebUI] Fix watermark display 7 years ago
flink-streaming-scala [FLINK-9366] DistributedCache works with Distributed File System 7 years ago
flink-test-utils-parent [FLINK-9623][runtime] Move zipping logic out of blobservice 7 years ago
flink-tests [FLINK-9463][runtime] Fix support for epoll transport type in netty 7 years ago
flink-yarn [FLINK-7836][Client] specifying node label for flink job to run on yarn 7 years ago
flink-yarn-tests [FLINK-9427] Fix registration and request slot race condition in TaskExecutor 7 years ago
tools [FLINK-9366] DistributedCache works with Distributed File System 7 years ago
.editorconfig [tools] add more defaults to .editorconfig 9 years ago
.gitattributes [FLINK-5485] [webfrontend] Mark compiled web frontend files as binary when processed by git diff 8 years ago
.gitignore [FLINK-7420] [avro] Move all Avro code to flink-avro 7 years ago
.travis.yml [hotfix] [build] Force delete corrupt jar files from cache 7 years ago
LICENSE [FLINK-9414] Remove unnecessary jline-reader and jline-terminal entries from LICENSE 7 years ago
NOTICE [FLINK-8359] [docs] Update copyright date in NOTICE 7 years ago
README.md [hotfix] Update README.md building prerequisites 7 years ago
deploysettings.xml
pom.xml [FLINK-3952][runtine] Upgrade to Netty 4.1 7 years 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 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)

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.

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 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.