54

GitHub - apache/flink: Apache Flink

 6 years ago
source link: https://github.com/apache/flink
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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.


Recommend

  • 115

    Apache Flink:Keyed Window与Non-Keyed Window Apache Flink中,Window操作在流式数据处理中是非常核心的一种抽象,它把一个无限流数据集分割成一个个有界的Window(或称为Bucket),然后...

  • 55

  • 50
    • www.tuicool.com 5 years ago
    • Cache

    一文了解Apache Flink

    什么是Flink Apache Flink是一个分布式大数据处理引擎,可以对 有限数据流 和 无限数据流 进行 有...

  • 28
    • matt33.com 5 years ago
    • Cache

    Apache Flink 初探 | Matt's Blog

    本篇文章是 Flink 系列 的第一篇,最近计划花个一到两个月的时间以最新的 Flink-1.9 代码为例把 Flink 的主要内容梳理一遍,这个系列文章的主要内容见 Flink 源码分析...

  • 51
    • 微信 mp.weixin.qq.com 4 years ago
    • Cache

    Apache Flink 知其然,知其所以然|No.1 - 序

    课程综述 《Apache Flink 知其然,知其所以然》课程,在内容上会先对Flink整体架构和所适用的场景做一个基础介绍,让你对Flink有一个整体的认识!然后对核心概念进行详细介绍,让你深入了解流计算中一些核心术语的含义,然后...

  • 45
    • 微信 mp.weixin.qq.com 4 years ago
    • Cache

    Apache Flink 误用之痛

    整理:lyee(Flink 社区志愿者) 摘要: 本文根据 Flink Forward 全球在线会议 · 中文精华版整理而成, 围绕着项目的 开始、需求分析、开发, 以及测试...

  • 44
    • 微信 mp.weixin.qq.com 4 years ago
    • Cache

    Apache Flink 漫谈系列之 State

    实际问题 在流计算场景中,数据会源源不断的流入Apache Flink系统,每条数据进入Apache Flink系统都会触发计算。如果我们想进行一个Count聚合计算,那么每次触发计算是将历史上所有流入的数据重新计算一次,还是每次计算都是在上一次计算结果之上进行...

  • 14
    • 微信 mp.weixin.qq.com 4 years ago
    • Cache

    Apache Flink 在网易的实践

    分享嘉宾:吴良波@网易 整理编辑:王洪...

  • 43
    • flink.apache.org 4 years ago
    • Cache

    Apache Flink: Apache Flink 1.11.3 Released

    Apache Flink 1.11.3 Released 18 Dec 2020 Xintong Song (@xtsong) The Apache Flink community released the third bugfix version of the Apache Flink 1.11 series. ...

  • 12

    Flink CDC Connectors Flink CDC Connectors is a set of source connectors for Apache Flink, ingesting changes from different databases using change data capture (CDC). The Flink CDC Connectors integrates Debezium as the engine to captu...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK