Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8EED19480 for ; Wed, 6 Apr 2016 12:38:40 +0000 (UTC) Received: (qmail 29479 invoked by uid 500); 6 Apr 2016 12:38:40 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 29433 invoked by uid 500); 6 Apr 2016 12:38:40 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 29298 invoked by uid 99); 6 Apr 2016 12:38:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 12:38:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 61061E0593; Wed, 6 Apr 2016 12:38:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: trohrmann@apache.org To: commits@flink.apache.org Date: Wed, 06 Apr 2016 12:38:42 -0000 Message-Id: <74f2270ec3404bf89f3716cd94fbc149@git.apache.org> In-Reply-To: <64187394caf1487db3f1e629d7b93e43@git.apache.org> References: <64187394caf1487db3f1e629d7b93e43@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/7] flink-web git commit: Add CEP blog post http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/improve-website.html ---------------------------------------------------------------------- diff --git a/content/improve-website.html b/content/improve-website.html index 32cb2fc..49039b2 100644 --- a/content/improve-website.html +++ b/content/improve-website.html @@ -170,11 +170,11 @@ http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/index.html ---------------------------------------------------------------------- diff --git a/content/index.html b/content/index.html index 336ca5c..85b4b89 100644 --- a/content/index.html +++ b/content/index.html @@ -235,6 +235,10 @@ http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/material.html ---------------------------------------------------------------------- diff --git a/content/material.html b/content/material.html index 1be5515..41df227 100644 --- a/content/material.html +++ b/content/material.html @@ -160,13 +160,13 @@ http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2014/01/13/stratosphere-release-0.4.html ---------------------------------------------------------------------- diff --git a/content/news/2014/01/13/stratosphere-release-0.4.html b/content/news/2014/01/13/stratosphere-release-0.4.html index 1b8e1af..4021fcd 100644 --- a/content/news/2014/01/13/stratosphere-release-0.4.html +++ b/content/news/2014/01/13/stratosphere-release-0.4.html @@ -160,7 +160,7 @@

13 Jan 2014

-

We are pleased to announce that version 0.4 of the Stratosphere system has been released.

+

We are pleased to announce that version 0.4 of the Stratosphere system has been released.

Our team has been working hard during the last few months to create an improved and stable Stratosphere version. The new version comes with many new features, usability and performance improvements in all levels, including a new Scala API for the concise specification of programs, a Pregel-like API, support for Yarn clusters, and major performance improvements. The system features now first-class support for iterative programs and thus covers traditional analytical use cases as well as data mining and graph processing use cases with great performance.

@@ -188,7 +188,7 @@ Follow our guide on how to start a Strat

The high-level language Meteor now natively serializes JSON trees for greater performance and offers additional operators and file formats. We greatly empowered the user to write crispier scripts by adding second-order functions, multi-output operators, and other syntactical sugar. For developers of Meteor packages, the API is much more comprehensive and allows to define custom data types that can be easily embedded in JSON trees through ad-hoc byte code generation.

Spargel: Pregel Inspired Graph Processing

-

Spargel is a vertex-centric API similar to the interface proposed in Google’s Pregel paper and implemented in Apache Giraph. Spargel is implemented in 500 lines of code (including comments) on top of Stratosphere’s delta iterations feature. This confirms the flexibility of Stratosphere’s architecture.

+

Spargel is a vertex-centric API similar to the interface proposed in Google’s Pregel paper and implemented in Apache Giraph. Spargel is implemented in 500 lines of code (including comments) on top of Stratosphere’s delta iterations feature. This confirms the flexibility of Stratosphere’s architecture.

Web Frontend

Using the new web frontend, you can monitor the progress of Stratosphere jobs. For finished jobs, the frontend shows a breakdown of the execution times for each operator. The webclient also visualizes the execution strategies chosen by the optimizer.

@@ -216,7 +216,7 @@ Follow our guide on how to start a Strat

Download and get started with Stratosphere v0.4

-

There are several options for getting started with Stratosphere.

+

There are several options for getting started with Stratosphere.

  • Download it on the download page
  • http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2014/02/18/amazon-elastic-mapreduce-cloud-yarn.html ---------------------------------------------------------------------- diff --git a/content/news/2014/02/18/amazon-elastic-mapreduce-cloud-yarn.html b/content/news/2014/02/18/amazon-elastic-mapreduce-cloud-yarn.html index b49ffe6..4616924 100644 --- a/content/news/2014/02/18/amazon-elastic-mapreduce-cloud-yarn.html +++ b/content/news/2014/02/18/amazon-elastic-mapreduce-cloud-yarn.html @@ -230,7 +230,7 @@ ssh hadoop@ec2-54-213-61-105.us-west-2.compute.amazonaws.com -i ~/Downloads/work-laptop.pem

    (Windows users have to follow these instructions to SSH into the machine running the master.) </br></br> -Once connected to the master, download and start Stratosphere for YARN:

    +Once connected to the master, download and start Stratosphere for YARN:

    • Download and extract Stratosphere-YARN
    • @@ -253,11 +253,11 @@ The arguments have the following meaning
-

Once the output has changed from

+

Once the output has changed from

JobManager is now running on N/A:6123
-

to

+

to

JobManager is now running on ip-172-31-13-68.us-west-2.compute.internal:6123
http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2014/11/04/release-0.7.0.html ---------------------------------------------------------------------- diff --git a/content/news/2014/11/04/release-0.7.0.html b/content/news/2014/11/04/release-0.7.0.html index 5bf7fad..c6e71af 100644 --- a/content/news/2014/11/04/release-0.7.0.html +++ b/content/news/2014/11/04/release-0.7.0.html @@ -180,7 +180,7 @@

Record API deprecated: The (old) Stratosphere Record API has been marked as deprecated and is planned for removal in the 0.9.0 release.

-

BLOB service: This release contains a new service to distribute jar files and other binary data among the JobManager, TaskManagers and the client.

+

BLOB service: This release contains a new service to distribute jar files and other binary data among the JobManager, TaskManagers and the client.

Intermediate data sets: A major rewrite of the system internals introduces intermediate data sets as first class citizens. The internal state machine that tracks the distributed tasks has also been completely rewritten for scalability. While this is not visible as a user-facing feature yet, it is the foundation for several upcoming exciting features.

http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2014/11/18/hadoop-compatibility.html ---------------------------------------------------------------------- diff --git a/content/news/2014/11/18/hadoop-compatibility.html b/content/news/2014/11/18/hadoop-compatibility.html index 5f6ad2f..2700d0f 100644 --- a/content/news/2014/11/18/hadoop-compatibility.html +++ b/content/news/2014/11/18/hadoop-compatibility.html @@ -168,7 +168,7 @@ -

To close this gap, Flink provides a Hadoop Compatibility package to wrap functions implemented against Hadoop’s MapReduce interfaces and embed them in Flink programs. This package was developed as part of a Google Summer of Code 2014 project.

+

To close this gap, Flink provides a Hadoop Compatibility package to wrap functions implemented against Hadoop’s MapReduce interfaces and embed them in Flink programs. This package was developed as part of a Google Summer of Code 2014 project.

With the Hadoop Compatibility package, you can reuse all your Hadoop

@@ -181,7 +181,7 @@

in Flink programs without changing a line of code. Moreover, Flink also natively supports all Hadoop data types (Writables and WritableComparable).

-

The following code snippet shows a simple Flink WordCount program that solely uses Hadoop data types, InputFormat, OutputFormat, Mapper, and Reducer functions.

+

The following code snippet shows a simple Flink WordCount program that solely uses Hadoop data types, InputFormat, OutputFormat, Mapper, and Reducer functions.

// Definition of Hadoop Mapper function
 public class Tokenizer implements Mapper<LongWritable, Text, Text, LongWritable> { ... }

http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/01/21/release-0.8.html
----------------------------------------------------------------------
diff --git a/content/news/2015/01/21/release-0.8.html b/content/news/2015/01/21/release-0.8.html
index 033c68f..ee397d3 100644
--- a/content/news/2015/01/21/release-0.8.html
+++ b/content/news/2015/01/21/release-0.8.html
@@ -211,7 +211,7 @@
   
  • Stefan Bunk
  • Paris Carbone
  • Ufuk Celebi
  • -
  • Nils Engelbach
  • +
  • Nils Engelbach
  • Stephan Ewen
  • Gyula Fora
  • Gabor Hermann
  • http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/02/04/january-in-flink.html ---------------------------------------------------------------------- diff --git a/content/news/2015/02/04/january-in-flink.html b/content/news/2015/02/04/january-in-flink.html index abba3bb..c3faa75 100644 --- a/content/news/2015/02/04/january-in-flink.html +++ b/content/news/2015/02/04/january-in-flink.html @@ -192,7 +192,7 @@

    Using off-heap memory

    -

    This pull request enables Flink to use off-heap memory for its internal memory uses (sort, hash, caching of intermediate data sets).

    +

    This pull request enables Flink to use off-heap memory for its internal memory uses (sort, hash, caching of intermediate data sets).

    http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/02/09/streaming-example.html ---------------------------------------------------------------------- diff --git a/content/news/2015/02/09/streaming-example.html b/content/news/2015/02/09/streaming-example.html index 29f304f..691ec3c 100644 --- a/content/news/2015/02/09/streaming-example.html +++ b/content/news/2015/02/09/streaming-example.html @@ -196,7 +196,7 @@ found

    @@ -668,7 +668,7 @@ number of mentions of a given stock in the Twitter stream. As both of these data streams are potentially infinite, we apply the join on a 30-second window.

    -

    Streaming joins

    +

    Streaming joins

    http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/03/13/peeking-into-Apache-Flinks-Engine-Room.html ---------------------------------------------------------------------- diff --git a/content/news/2015/03/13/peeking-into-Apache-Flinks-Engine-Room.html b/content/news/2015/03/13/peeking-into-Apache-Flinks-Engine-Room.html index f3ab494..49fdcbb 100644 --- a/content/news/2015/03/13/peeking-into-Apache-Flinks-Engine-Room.html +++ b/content/news/2015/03/13/peeking-into-Apache-Flinks-Engine-Room.html @@ -167,7 +167,7 @@

    In this blog post, we cut through Apache Flink’s layered architecture and take a look at its internals with a focus on how it handles joins. Specifically, I will

      -
    • show how easy it is to join data sets using Flink’s fluent APIs,
    • +
    • show how easy it is to join data sets using Flink’s fluent APIs,
    • discuss basic distributed join strategies, Flink’s join implementations, and its memory management,
    • talk about Flink’s optimizer that automatically chooses join strategies,
    • show some performance numbers for joining data sets of different sizes, and finally
    • @@ -178,7 +178,7 @@ -

      Flink provides fluent APIs in Java and Scala to write data flow programs. Flink’s APIs are centered around parallel data collections which are called data sets. data sets are processed by applying Transformations that compute new data sets. Flink’s transformations include Map and Reduce as known from MapReduce [1] but also operators for joining, co-grouping, and iterative processing. The documentation gives an overview of all available transformations [2].

      +

      Flink provides fluent APIs in Java and Scala to write data flow programs. Flink’s APIs are centered around parallel data collections which are called data sets. data sets are processed by applying Transformations that compute new data sets. Flink’s transformations include Map and Reduce as known from MapReduce [1] but also operators for joining, co-grouping, and iterative processing. The documentation gives an overview of all available transformations [2].

      Joining two Scala case class data sets is very easy as the following example shows:

      @@ -215,7 +215,7 @@
      1. The data of both inputs is distributed across all parallel instances that participate in the join and
      2. -
      3. each parallel instance performs a standard stand-alone join algorithm on its local partition of the overall data.
      4. +
      5. each parallel instance performs a standard stand-alone join algorithm on its local partition of the overall data.

      The distribution of data across parallel instances must ensure that each valid join pair can be locally built by exactly one instance. For both steps, there are multiple valid strategies that can be independently picked and which are favorable in different situations. In Flink terminology, the first phase is called Ship Strategy and the second phase Local Strategy. In the following I will describe Flink’s ship and local strategies to join two data sets R and S.

      @@ -234,7 +234,7 @@ -

      The Broadcast-Forward strategy sends one complete data set (R) to each parallel instance that holds a partition of the other data set (S), i.e., each parallel instance receives the full data set R. Data set S remains local and is not shipped at all. The cost of the BF strategy depends on the size of R and the number of parallel instances it is shipped to. The size of S does not matter because S is not moved. The figure below illustrates how both ship strategies work.

      +

      The Broadcast-Forward strategy sends one complete data set (R) to each parallel instance that holds a partition of the other data set (S), i.e., each parallel instance receives the full data set R. Data set S remains local and is not shipped at all. The cost of the BF strategy depends on the size of R and the number of parallel instances it is shipped to. The size of S does not matter because S is not moved. The figure below illustrates how both ship strategies work.

      @@ -243,7 +243,7 @@

      The Repartition-Repartition and Broadcast-Forward ship strategies establish suitable data distributions to execute a distributed join. Depending on the operations that are applied before the join, one or even both inputs of a join are already distributed in a suitable way across parallel instances. In this case, Flink will reuse such distributions and only ship one or no input at all.

      -

      Before delving into the details of Flink’s local join algorithms, I will briefly discuss Flink’s internal memory management. Data processing algorithms such as joining, grouping, and sorting need to hold portions of their input data in memory. While such algorithms perform best if there is enough memory available to hold all data, it is crucial to gracefully handle situations where the data size exceeds memory. Such situations are especially tricky in JVM-based systems such as Flink because the system needs to reliably recognize that it is short on memory. Failure to detect such situations can result in an OutOfMemoryException and kill the JVM.

      +

      Before delving into the details of Flink’s local join algorithms, I will briefly discuss Flink’s internal memory management. Data processing algorithms such as joining, grouping, and sorting need to hold portions of their input data in memory. While such algorithms perform best if there is enough memory available to hold all data, it is crucial to gracefully handle situations where the data size exceeds memory. Such situations are especially tricky in JVM-based systems such as Flink because the system needs to reliably recognize that it is short on memory. Failure to detect such situations can result in an OutOfMemoryException and kill the JVM.

      Flink handles this challenge by actively managing its memory. When a worker node (TaskManager) is started, it allocates a fixed portion (70% by default) of the JVM’s heap memory that is available after initialization as 32KB byte arrays. These byte arrays are distributed as working memory to all algorithms that need to hold significant portions of data in memory. The algorithms receive their input data as Java data objects and serialize them into their working memory.

      @@ -260,7 +260,7 @@

      After the data has been distributed across all parallel join instances using either a Repartition-Repartition or Broadcast-Forward ship strategy, each instance runs a local join algorithm to join the elements of its local partition. Flink’s runtime features two common join strategies to perform these local joins:

        -
      • the Sort-Merge-Join strategy (SM) and
      • +
      • the Sort-Merge-Join strategy (SM) and
      • the Hybrid-Hash-Join strategy (HH).
      @@ -305,13 +305,13 @@
      • 1GB : 1000GB
      • 10GB : 1000GB
      • -
      • 100GB : 1000GB
      • +
      • 100GB : 1000GB
      • 1000GB : 1000GB

      The Broadcast-Forward strategy is only executed for up to 10GB. Building a hash table from 100GB broadcasted data in 5GB working memory would result in spilling proximately 95GB (build input) + 950GB (probe input) in each parallel thread and require more than 8TB local disk storage on each machine.

      -

      As in the single-core benchmark, we run 1:N joins, generate the data on-the-fly, and immediately discard the result after the join. We run the benchmark on 10 n1-highmem-8 Google Compute Engine instances. Each instance is equipped with 8 cores, 52GB RAM, 40GB of which are configured as working memory (5GB per core), and one local SSD for spilling to disk. All benchmarks are performed using the same configuration, i.e., no fine tuning for the respective data sizes is done. The programs are executed with a parallelism of 80.

      +

      As in the single-core benchmark, we run 1:N joins, generate the data on-the-fly, and immediately discard the result after the join. We run the benchmark on 10 n1-highmem-8 Google Compute Engine instances. Each instance is equipped with 8 cores, 52GB RAM, 40GB of which are configured as working memory (5GB per core), and one local SSD for spilling to disk. All benchmarks are performed using the same configuration, i.e., no fine tuning for the respective data sizes is done. The programs are executed with a parallelism of 80.

      @@ -328,7 +328,7 @@
      • Flink’s fluent Scala and Java APIs make joins and other data transformations easy as cake.
      • The optimizer does the hard choices for you, but gives you control in case you know better.
      • -
      • Flink’s join implementations perform very good in-memory and gracefully degrade when going to disk.
      • +
      • Flink’s join implementations perform very good in-memory and gracefully degrade when going to disk.
      • Due to Flink’s robust memory management, there is no need for job- or data-specific memory tuning to avoid a nasty OutOfMemoryException. It just runs out-of-the-box.
      http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/05/11/Juggling-with-Bits-and-Bytes.html ---------------------------------------------------------------------- diff --git a/content/news/2015/05/11/Juggling-with-Bits-and-Bytes.html b/content/news/2015/05/11/Juggling-with-Bits-and-Bytes.html index f6f9d5a..6f6ce52 100644 --- a/content/news/2015/05/11/Juggling-with-Bits-and-Bytes.html +++ b/content/news/2015/05/11/Juggling-with-Bits-and-Bytes.html @@ -179,7 +179,7 @@ However, this approach has a few notable drawbacks. First of all it is not trivi
      -

      Flink’s style of active memory management and operating on binary data has several benefits:

      +

      Flink’s style of active memory management and operating on binary data has several benefits:

      1. Memory-safe execution & efficient out-of-core algorithms. Due to the fixed amount of allocated memory segments, it is trivial to monitor remaining memory resources. In case of memory shortage, processing operators can efficiently write larger batches of memory segments to disk and later them read back. Consequently, OutOfMemoryErrors are effectively prevented.
      2. @@ -188,13 +188,13 @@ However, this approach has a few notable drawbacks. First of all it is not trivi
      3. Efficient binary operations & cache sensitivity. Binary data can be efficiently compared and operated on given a suitable binary representation. Furthermore, the binary representations can put related values, as well as hash codes, keys, and pointers, adjacently into memory. This gives data structures with usually more cache efficient access patterns.
      -

      These properties of active memory management are very desirable in a data processing systems for large-scale data analytics but have a significant price tag attached. Active memory management and operating on binary data is not trivial to implement, i.e., using java.util.HashMap is much easier than implementing a spillable hash-table backed by byte arrays and a custom serialization stack. Of course Apache Flink is not the only JVM-based data processing system that operates on serialized binary data. Projects such as Apache Drill, Apache Ignite (incubating) or Apache Geode (incubating) apply similar techniques and it was recently announced that also Apache Spark will evolve into this direction with Project Tungsten.

      +

      These properties of active memory management are very desirable in a data processing systems for large-scale data analytics but have a significant price tag attached. Active memory management and operating on binary data is not trivial to implement, i.e., using java.util.HashMap is much easier than implementing a spillable hash-table backed by byte arrays and a custom serialization stack. Of course Apache Flink is not the only JVM-based data processing system that operates on serialized binary data. Projects such as Apache Drill, Apache Ignite (incubating) or Apache Geode (incubating) apply similar techniques and it was recently announced that also Apache Spark will evolve into this direction with Project Tungsten.

      In the following we discuss in detail how Flink allocates memory, de/serializes objects, and operates on binary data. We will also show some performance numbers comparing processing objects on the heap and operating on binary data.

      -

      A Flink worker, called TaskManager, is composed of several internal components such as an actor system for coordination with the Flink master, an IOManager that takes care of spilling data to disk and reading it back, and a MemoryManager that coordinates memory usage. In the context of this blog post, the MemoryManager is of most interest.

      +

      A Flink worker, called TaskManager, is composed of several internal components such as an actor system for coordination with the Flink master, an IOManager that takes care of spilling data to disk and reading it back, and a MemoryManager that coordinates memory usage. In the context of this blog post, the MemoryManager is of most interest.

      The MemoryManager takes care of allocating, accounting, and distributing MemorySegments to data processing operators such as sort and join operators. A MemorySegment is Flink’s distribution unit of memory and is backed by a regular Java byte array (size is 32 KB by default). A MemorySegment provides very efficient write and read access to its backed byte array using Java’s unsafe methods. You can think of a MemorySegment as a custom-tailored version of Java’s NIO ByteBuffer. In order to operate on multiple MemorySegments like on a larger chunk of consecutive memory, Flink uses logical views that implement Java’s java.io.DataOutput and java.io.DataInput interfaces.

      @@ -206,7 +206,7 @@ However, this approach has a few notable drawbacks. First of all it is not trivi -

      The Java ecosystem offers several libraries to convert objects into a binary representation and back. Common alternatives are standard Java serialization, Kryo, Apache Avro, Apache Thrift, or Google’s Protobuf. Flink includes its own custom serialization framework in order to control the binary representation of data. This is important because operating on binary data such as comparing or even manipulating binary data requires exact knowledge of the serialization layout. Further, configuring the serialization layout with respect to operations that are performed on binary data can yield a significant performance boost. Flink’s serialization stack also leverages the fact, that the type of the objects which are going through de/serialization are exactly known before a program is executed.

      +

      The Java ecosystem offers several libraries to convert objects into a binary representation and back. Common alternatives are standard Java serialization, Kryo, Apache Avro, Apache Thrift, or Google’s Protobuf. Flink includes its own custom serialization framework in order to control the binary representation of data. This is important because operating on binary data such as comparing or even manipulating binary data requires exact knowledge of the serialization layout. Further, configuring the serialization layout with respect to operations that are performed on binary data can yield a significant performance boost. Flink’s serialization stack also leverages the fact, that the type of the objects which are going through de/serialization are exactly known before a program is executed.

      Flink programs can process data represented as arbitrary Java or Scala objects. Before a program is optimized, the data types at each processing step of the program’s data flow need to be identified. For Java programs, Flink features a reflection-based type extraction component to analyze the return types of user-defined functions. Scala programs are analyzed with help of the Scala compiler. Flink represents each data type with a TypeInformation. Flink has TypeInformations for several kinds of data types, including:

      @@ -216,11 +216,11 @@ However, this approach has a few notable drawbacks. First of all it is not trivi
    • WritableTypeInfo: Any implementation of Hadoop’s Writable interface.
    • TupleTypeInfo: Any Flink tuple (Tuple1 to Tuple25). Flink tuples are Java representations for fixed-length tuples with typed fields.
    • CaseClassTypeInfo: Any Scala CaseClass (including Scala tuples).
    • -
    • PojoTypeInfo: Any POJO (Java or Scala), i.e., an object with all fields either being public or accessible through getters and setter that follow the common naming conventions.
    • +
    • PojoTypeInfo: Any POJO (Java or Scala), i.e., an object with all fields either being public or accessible through getters and setter that follow the common naming conventions.
    • GenericTypeInfo: Any data type that cannot be identified as another type.
    -

    Each TypeInformation provides a serializer for the data type it represents. For example, a BasicTypeInfo returns a serializer that writes the respective primitive type, the serializer of a WritableTypeInfo delegates de/serialization to the write() and readFields() methods of the object implementing Hadoop’s Writable interface, and a GenericTypeInfo returns a serializer that delegates serialization to Kryo. Object serialization to a DataOutput which is backed by Flink MemorySegments goes automatically through Java’s efficient unsafe operations. For data types that can be used as keys, i.e., compared and hashed, the TypeInformation provides TypeComparators. TypeComparators compare and hash objects and can - depending on the concrete data type - also efficiently compare binary representations and extract fixed-length binary key prefixes.

    +

    Each TypeInformation provides a serializer for the data type it represents. For example, a BasicTypeInfo returns a serializer that writes the respective primitive type, the serializer of a WritableTypeInfo delegates de/serialization to the write() and readFields() methods of the object implementing Hadoop’s Writable interface, and a GenericTypeInfo returns a serializer that delegates serialization to Kryo. Object serialization to a DataOutput which is backed by Flink MemorySegments goes automatically through Java’s efficient unsafe operations. For data types that can be used as keys, i.e., compared and hashed, the TypeInformation provides TypeComparators. TypeComparators compare and hash objects and can - depending on the concrete data type - also efficiently compare binary representations and extract fixed-length binary key prefixes.

    Tuple, Pojo, and CaseClass types are composite types, i.e., containers for one or more possibly nested data types. As such, their serializers and comparators are also composite and delegate the serialization and comparison of their member data types to the respective serializers and comparators. The following figure illustrates the serialization of a (nested) Tuple3<Integer, Double, Person> object where Person is a POJO and defined as follows:

    @@ -233,13 +233,13 @@ However, this approach has a few notable drawbacks. First of all it is not trivi -

    Flink’s type system can be easily extended by providing custom TypeInformations, Serializers, and Comparators to improve the performance of serializing and comparing custom data types.

    +

    Flink’s type system can be easily extended by providing custom TypeInformations, Serializers, and Comparators to improve the performance of serializing and comparing custom data types.

    Similar to many other data processing APIs (including SQL), Flink’s APIs provide transformations to group, sort, and join data sets. These transformations operate on potentially very large data sets. Relational database systems feature very efficient algorithms for these purposes since several decades including external merge-sort, merge-join, and hybrid hash-join. Flink builds on this technology, but generalizes it to handle arbitrary objects using its custom serialization and comparison stack. In the following, we show how Flink operates with binary data by the example of Flink’s in-memory sort algorithm.

    -

    Flink assigns a memory budget to its data processing operators. Upon initialization, a sort algorithm requests its memory budget from the MemoryManager and receives a corresponding set of MemorySegments. The set of MemorySegments becomes the memory pool of a so-called sort buffer which collects the data that is be sorted. The following figure illustrates how data objects are serialized into the sort buffer.

    +

    Flink assigns a memory budget to its data processing operators. Upon initialization, a sort algorithm requests its memory budget from the MemoryManager and receives a corresponding set of MemorySegments. The set of MemorySegments becomes the memory pool of a so-called sort buffer which collects the data that is be sorted. The following figure illustrates how data objects are serialized into the sort buffer.

    @@ -252,7 +252,7 @@ The following figure shows how two objects are compared.

    -

    The sort buffer compares two elements by comparing their binary fix-length sort keys. The comparison is successful if either done on a full key (not a prefix key) or if the binary prefix keys are not equal. If the prefix keys are equal (or the sort key data type does not provide a binary prefix key), the sort buffer follows the pointers to the actual object data, deserializes both objects and compares the objects. Depending on the result of the comparison, the sort algorithm decides whether to swap the compared elements or not. The sort buffer swaps two elements by moving their fix-length keys and pointers. The actual data is not moved. Once the sort algorithm finishes, the pointers in the sort buffer are correctly ordered. The following figure shows how the sorted data is returned from the sort buffer.

    +

    The sort buffer compares two elements by comparing their binary fix-length sort keys. The comparison is successful if either done on a full key (not a prefix key) or if the binary prefix keys are not equal. If the prefix keys are equal (or the sort key data type does not provide a binary prefix key), the sort buffer follows the pointers to the actual object data, deserializes both objects and compares the objects. Depending on the result of the comparison, the sort algorithm decides whether to swap the compared elements or not. The sort buffer swaps two elements by moving their fix-length keys and pointers. The actual data is not moved. Once the sort algorithm finishes, the pointers in the sort buffer are correctly ordered. The following figure shows how the sorted data is returned from the sort buffer.

    @@ -270,7 +270,7 @@ The following figure shows how two objects are compared.

  • Kryo-serialized. The tuple fields are serialized into a sort buffer of 600 MB size using Kryo serialization and sorted without binary sort keys. This means that each pair-wise comparison requires two object to be deserialized.
  • -

    All sort methods are implemented using a single thread. The reported times are averaged over ten runs. After each run, we call System.gc() to request a garbage collection run which does not go into measured execution time. The following figure shows the time to store the input data in memory, sort it, and read it back as objects.

    +

    All sort methods are implemented using a single thread. The reported times are averaged over ten runs. After each run, we call System.gc() to request a garbage collection run which does not go into measured execution time. The following figure shows the time to store the input data in memory, sort it, and read it back as objects.

    @@ -328,13 +328,13 @@ The following figure shows how two objects are compared.


    -

    To summarize, the experiments verify the previously stated benefits of operating on binary data.

    +

    To summarize, the experiments verify the previously stated benefits of operating on binary data.

    We’re not done yet!

    -

    Apache Flink features quite a bit of advanced techniques to safely and efficiently process huge amounts of data with limited memory resources. However, there are a few points that could make Flink even more efficient. The Flink community is working on moving the managed memory to off-heap memory. This will allow for smaller JVMs, lower garbage collection overhead, and also easier system configuration. With Flink’s Table API, the semantics of all operations such as aggregations and projections are known (in contrast to black-box user-defined functions). Hence we can generate code for Table API operations that directly operates on binary data. Further improvements include serialization layouts which are tailored towards the operations that are applied on the binary data and code generation for serializers and comparators.

    +

    Apache Flink features quite a bit of advanced techniques to safely and efficiently process huge amounts of data with limited memory resources. However, there are a few points that could make Flink even more efficient. The Flink community is working on moving the managed memory to off-heap memory. This will allow for smaller JVMs, lower garbage collection overhead, and also easier system configuration. With Flink’s Table API, the semantics of all operations such as aggregations and projections are known (in contrast to black-box user-defined functions). Hence we can generate code for Table API operations that directly operates on binary data. Further improvements include serialization layouts which are tailored towards the operations that are applied on the binary data and code generation for serializers and comparators.

    -

    The groundwork (and a lot more) for operating on binary data is done but there is still some room for making Flink even better and faster. If you are crazy about performance and like to juggle with lot of bits and bytes, join the Flink community!

    +

    The groundwork (and a lot more) for operating on binary data is done but there is still some room for making Flink even better and faster. If you are crazy about performance and like to juggle with lot of bits and bytes, join the Flink community!

    TL;DR; Give me three things to remember!

    http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/05/14/Community-update-April.html ---------------------------------------------------------------------- diff --git a/content/news/2015/05/14/Community-update-April.html b/content/news/2015/05/14/Community-update-April.html index 36deba1..6338b77 100644 --- a/content/news/2015/05/14/Community-update-April.html +++ b/content/news/2015/05/14/Community-update-April.html @@ -160,7 +160,7 @@

    14 May 2015 by Kostas Tzoumas (@kostas_tzoumas)

    -

    April was an packed month for Apache Flink.

    +

    April was an packed month for Apache Flink.

    @@ -176,7 +176,7 @@ -

    Fabian Hueske gave an interview at InfoQ on Apache Flink.

    +

    Fabian Hueske gave an interview at InfoQ on Apache Flink.

    Upcoming events

    http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/08/24/introducing-flink-gelly.html ---------------------------------------------------------------------- diff --git a/content/news/2015/08/24/introducing-flink-gelly.html b/content/news/2015/08/24/introducing-flink-gelly.html index f8a4fd7..726f15a 100644 --- a/content/news/2015/08/24/introducing-flink-gelly.html +++ b/content/news/2015/08/24/introducing-flink-gelly.html @@ -226,21 +226,21 @@ and mutations as well as neighborhood aggregations.

    Common Graph Metrics

    These methods can be used to retrieve several graph metrics and properties, such as the number -of vertices, edges and the node degrees.

    +of vertices, edges and the node degrees.

    Transformations

    The transformation methods enable several Graph operations, using high-level functions similar to the ones provided by the batch processing API. These transformations can be applied one after the -other, yielding a new Graph after each step, in a fashion similar to operators on DataSets:

    +other, yielding a new Graph after each step, in a fashion similar to operators on DataSets:

    inputGraph.getUndirected().mapEdges(new CustomEdgeMapper());

    Transformations can be applied on:

      -
    1. Vertices: mapVertices, joinWithVertices, filterOnVertices, addVertex, …
    2. -
    3. Edges: mapEdges, filterOnEdges, removeEdge, …
    4. -
    5. Triplets (source vertex, target vertex, edge): getTriplets
    6. +
    7. Vertices: mapVertices, joinWithVertices, filterOnVertices, addVertex, …
    8. +
    9. Edges: mapEdges, filterOnEdges, removeEdge, …
    10. +
    11. Triplets (source vertex, target vertex, edge): getTriplets

    Neighborhood Aggregations

    @@ -374,7 +374,7 @@ vertex values do not need to be recomputed during an iteration.

    Let us reconsider the Single Source Shortest Paths algorithm. In each iteration, a vertex:

      -
    1. Gather retrieves distances from its neighbors summed up with the corresponding edge values;
    2. +
    3. Gather retrieves distances from its neighbors summed up with the corresponding edge values;
    4. Sum compares the newly obtained distances in order to extract the minimum;
    5. Apply and finally adopts the minimum distance computed in the sum step, provided that it is lower than its current value. If a vertex’s value does not change during @@ -433,7 +433,7 @@ plays that each song has. We then filter out the list of songs the users do not playlist. Then we compute the top songs per user (i.e. the songs a user listened to the most). Finally, as a separate use-case on the same data set, we create a user-user similarity graph based on the common songs and use this resulting graph to detect communities by calling Gelly’s Label Propagation -library method.

      +library method.

      For running the example implementation, please use the 0.10-SNAPSHOT version of Flink as a dependency. The full example code base can be found here. The public data set used for testing @@ -523,10 +523,10 @@ in the figure below.

      To form the user-user graph in Flink, we will simply take the edges from the user-song graph (left-hand side of the image), group them by song-id, and then add all the users (source vertex ids) -to an ArrayList.

      +to an ArrayList.

      We then match users who listened to the same song two by two, creating a new edge to mark their -common interest (right-hand side of the image).

      +common interest (right-hand side of the image).

      Afterwards, we perform a distinct() operation to avoid creation of duplicate data. Considering that we now have the DataSet of edges which present interest, creating a graph is as @@ -565,7 +565,7 @@ formed. To do so, we first initialize each vertex with a numeric label using the the id of a vertex with the first element of the tuple, afterwards applying a map function. Finally, we call the run() method with the LabelPropagation library method passed as a parameter. In the end, the vertices will be updated to contain the most frequent label -among their neighbors.

      +among their neighbors.

      // detect user communities using label propagation
       // initialize each vertex with a unique numeric label
      @@ -595,10 +595,10 @@ among their neighbors.

      Currently, Gelly matches the basic functionalities provided by most state-of-the-art graph processing systems. Our vision is to turn Gelly into more than “yet another library for running PageRank-like algorithms” by supporting generic iterations, implementing graph partitioning, -providing bipartite graph support and by offering numerous other features.

      +providing bipartite graph support and by offering numerous other features.

      We are also enriching Flink Gelly with a set of operators suitable for highly skewed graphs -as well as a Graph API built on Flink Streaming.

      +as well as a Graph API built on Flink Streaming.

      In the near future, we would like to see how Gelly can be integrated with graph visualization tools, graph database systems and sampling techniques.

      http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/09/16/off-heap-memory.html ---------------------------------------------------------------------- diff --git a/content/news/2015/09/16/off-heap-memory.html b/content/news/2015/09/16/off-heap-memory.html index b75c160..4383cc1 100644 --- a/content/news/2015/09/16/off-heap-memory.html +++ b/content/news/2015/09/16/off-heap-memory.html @@ -206,7 +206,7 @@

      The off-heap Memory Implementation

      -

      Given that all memory intensive internal algorithms are already implemented against the MemorySegment, our implementation to switch to off-heap memory is actually trivial. You can compare it to replacing all ByteBuffer.allocate(numBytes) calls with ByteBuffer.allocateDirect(numBytes). In Flink’s case it meant that we made the MemorySegment abstract and added the HeapMemorySegment and OffHeapMemorySegment subclasses. The OffHeapMemorySegment takes the off-heap memory pointer from a java.nio.DirectByteBuffer and implements its specialized access methods using sun.misc.Unsafe. We also made a few adjustments to the startup scripts and the deployment code to make sure that the JVM is permitted enough off-heap memory (direct memory, -XX:MaxDirectMemorySize).

      +

      Given that all memory intensive internal algorithms are already implemented against the MemorySegment, our implementation to switch to off-heap memory is actually trivial. You can compare it to replacing all ByteBuffer.allocate(numBytes) calls with ByteBuffer.allocateDirect(numBytes). In Flink’s case it meant that we made the MemorySegment abstract and added the HeapMemorySegment and OffHeapMemorySegment subclasses. The OffHeapMemorySegment takes the off-heap memory pointer from a java.nio.DirectByteBuffer and implements its specialized access methods using sun.misc.Unsafe. We also made a few adjustments to the startup scripts and the deployment code to make sure that the JVM is permitted enough off-heap memory (direct memory, -XX:MaxDirectMemorySize).

      In practice we had to go one step further, to make the implementation perform well. While the ByteBuffer is used in I/O code paths to compose headers and move bulk memory into place, the MemorySegment is part of the innermost loops of many algorithms (sorting, hash tables, …). That means that the access methods have to be as fast as possible.

      http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/11/16/release-0.10.0.html ---------------------------------------------------------------------- diff --git a/content/news/2015/11/16/release-0.10.0.html b/content/news/2015/11/16/release-0.10.0.html index d3627b9..163f98e 100644 --- a/content/news/2015/11/16/release-0.10.0.html +++ b/content/news/2015/11/16/release-0.10.0.html @@ -162,7 +162,7 @@

      The Apache Flink community is pleased to announce the availability of the 0.10.0 release. The community put significant effort into improving and extending Apache Flink since the last release, focusing on data stream processing and operational features. About 80 contributors provided bug fixes, improvements, and new features such that in total more than 400 JIRA issues could be resolved.

      -

      For Flink 0.10.0, the focus of the community was to graduate the DataStream API from beta and to evolve Apache Flink into a production-ready stream data processor with a competitive feature set. These efforts resulted in support for event-time and out-of-order streams, exactly-once guarantees in the case of failures, a very flexible windowing mechanism, sophisticated operator state management, and a highly-available cluster operation mode. Flink 0.10.0 also brings a new monitoring dashboard with real-time system and job monitoring capabilities. Both batch and streaming modes of Flink benefit from the new high availability and improved monitoring features. Needless to say that Flink 0.10.0 includes many more features, improvements, and bug fixes.

      +

      For Flink 0.10.0, the focus of the community was to graduate the DataStream API from beta and to evolve Apache Flink into a production-ready stream data processor with a competitive feature set. These efforts resulted in support for event-time and out-of-order streams, exactly-once guarantees in the case of failures, a very flexible windowing mechanism, sophisticated operator state management, and a highly-available cluster operation mode. Flink 0.10.0 also brings a new monitoring dashboard with real-time system and job monitoring capabilities. Both batch and streaming modes of Flink benefit from the new high availability and improved monitoring features. Needless to say that Flink 0.10.0 includes many more features, improvements, and bug fixes.

      We encourage everyone to download the release and check out the documentation. Feedback through the Flink mailing lists is, as always, very welcome!

      http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2015/12/04/Introducing-windows.html ---------------------------------------------------------------------- diff --git a/content/news/2015/12/04/Introducing-windows.html b/content/news/2015/12/04/Introducing-windows.html index 715c0cb..1f9201c 100644 --- a/content/news/2015/12/04/Introducing-windows.html +++ b/content/news/2015/12/04/Introducing-windows.html @@ -160,7 +160,7 @@

      04 Dec 2015 by Fabian Hueske (@fhueske)

      -

      The data analysis space is witnessing an evolution from batch to stream processing for many use cases. Although batch can be handled as a special case of stream processing, analyzing never-ending streaming data often requires a shift in the mindset and comes with its own terminology (for example, “windowing” and “at-least-once”/”exactly-once” processing). This shift and the new terminology can be quite confusing for people being new to the space of stream processing. Apache Flink is a production-ready stream processor with an easy-to-use yet very expressive API to define advanced stream analysis programs. Flink’s API features very flexible window definitions on data streams which let it stand out among other open source stream processors.

      +

      The data analysis space is witnessing an evolution from batch to stream processing for many use cases. Although batch can be handled as a special case of stream processing, analyzing never-ending streaming data often requires a shift in the mindset and comes with its own terminology (for example, “windowing” and “at-least-once”/”exactly-once” processing). This shift and the new terminology can be quite confusing for people being new to the space of stream processing. Apache Flink is a production-ready stream processor with an easy-to-use yet very expressive API to define advanced stream analysis programs. Flink’s API features very flexible window definitions on data streams which let it stand out among other open source stream processors.

      In this blog post, we discuss the concept of windows for stream processing, present Flink’s built-in windows, and explain its support for custom windowing semantics.

      @@ -223,17 +223,17 @@

      There is one aspect that we haven’t discussed yet, namely the exact meaning of “collects elements for one minute” which boils down to the question, “How does the stream processor interpret time?”.

      -

      Apache Flink features three different notions of time, namely processing time, event time, and ingestion time.

      +

      Apache Flink features three different notions of time, namely processing time, event time, and ingestion time.

        -
      1. In processing time, windows are defined with respect to the wall clock of the machine that builds and processes a window, i.e., a one minute processing time window collects elements for exactly one minute.
      2. -
      3. In event time, windows are defined with respect to timestamps that are attached to each event record. This is common for many types of events, such as log entries, sensor data, etc, where the timestamp usually represents the time at which the event occurred. Event time has several benefits over processing time. First of all, it decouples the program semantics from the actual serving speed of the source and the processing performance of system. Hence you can process historic data, which is served at maximum speed, and continuously produced data with the same program. It also prevents semantically incorrect results in case of backpressure or delays due to failure recovery. Second, event time windows compute correct results, even if events arrive out-of-order of their timestamp which is common if a data stream gathers events from distributed sources.
      4. +
      5. In processing time, windows are defined with respect to the wall clock of the machine that builds and processes a window, i.e., a one minute processing time window collects elements for exactly one minute.
      6. +
      7. In event time, windows are defined with respect to timestamps that are attached to each event record. This is common for many types of events, such as log entries, sensor data, etc, where the timestamp usually represents the time at which the event occurred. Event time has several benefits over processing time. First of all, it decouples the program semantics from the actual serving speed of the source and the processing performance of system. Hence you can process historic data, which is served at maximum speed, and continuously produced data with the same program. It also prevents semantically incorrect results in case of backpressure or delays due to failure recovery. Second, event time windows compute correct results, even if events arrive out-of-order of their timestamp which is common if a data stream gathers events from distributed sources.
      8. Ingestion time is a hybrid of processing and event time. It assigns wall clock timestamps to records as soon as they arrive in the system (at the source) and continues processing with event time semantics based on the attached timestamps.

      Count Windows

      -

      Apache Flink also features count windows. A tumbling count window of 100 will collect 100 events in a window and evaluate the window when the 100th element has been added.

      +

      Apache Flink also features count windows. A tumbling count window of 100 will collect 100 events in a window and evaluate the window when the 100th element has been added.

      In Flink’s DataStream API, tumbling and sliding count windows are defined as follows:

      @@ -256,7 +256,7 @@ -

      Flink’s built-in time and count windows cover a wide range of common window use cases. However, there are of course applications that require custom windowing logic that cannot be addressed by Flink’s built-in windows. In order to support also applications that need very specific windowing semantics, the DataStream API exposes interfaces for the internals of its windowing mechanics. These interfaces give very fine-grained control about the way that windows are built and evaluated.

      +

      Flink’s built-in time and count windows cover a wide range of common window use cases. However, there are of course applications that require custom windowing logic that cannot be addressed by Flink’s built-in windows. In order to support also applications that need very specific windowing semantics, the DataStream API exposes interfaces for the internals of its windowing mechanics. These interfaces give very fine-grained control about the way that windows are built and evaluated.

      The following figure depicts Flink’s windowing mechanism and introduces the components being involved.

      http://git-wip-us.apache.org/repos/asf/flink-web/blob/ebaf2975/content/news/2016/03/08/release-1.0.0.html ---------------------------------------------------------------------- diff --git a/content/news/2016/03/08/release-1.0.0.html b/content/news/2016/03/08/release-1.0.0.html index 6393e6e..8e428d8 100644 --- a/content/news/2016/03/08/release-1.0.0.html +++ b/content/news/2016/03/08/release-1.0.0.html @@ -160,7 +160,7 @@

      08 Mar 2016

      -

      The Apache Flink community is pleased to announce the availability of the 1.0.0 release. The community put significant effort into improving and extending Apache Flink since the last release, focusing on improving the experience of writing and executing data stream processing pipelines in production.

      +

      The Apache Flink community is pleased to announce the availability of the 1.0.0 release. The community put significant effort into improving and extending Apache Flink since the last release, focusing on improving the experience of writing and executing data stream processing pipelines in production.

      @@ -201,7 +201,7 @@ When using this backend, active state in streaming programs can grow well beyond

      The checkpointing has been extended by a more fine-grained control mechanism: In previous versions, new checkpoints were triggered independent of the speed at which old checkpoints completed. This can lead to situations where new checkpoints are piling up, because they are triggered too frequently.

      -

      The checkpoint coordinator now exposes statistics through our REST monitoring API and the web interface. Users can review the checkpoint size and duration on a per-operator basis and see the last completed checkpoints. This is helpful for identifying performance issues, such as processing slowdown by the checkpoints.

      +

      The checkpoint coordinator now exposes statistics through our REST monitoring API and the web interface. Users can review the checkpoint size and duration on a per-operator basis and see the last completed checkpoints. This is helpful for identifying performance issues, such as processing slowdown by the checkpoints.

      Improved Kafka connector and support for Kafka 0.9