Skip to content

Commit

Permalink
[docs] Update README and internals (scheduling) for graduation and fi…
Browse files Browse the repository at this point in the history
…x broken links
  • Loading branch information
StephanEwen committed Jan 8, 2015
1 parent 0954c4e commit 7f659f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Flink is highlighted by some unique features:
* Custom type analysis and serialization stack for high performance


Learn more about Flink at http:https://flink.incubator.apache.org/
Learn more about Flink at [http:https://flink.apache.org/](http:https://flink.apache.org/)


## Building Apache Flink from Source
Expand Down Expand Up @@ -62,17 +62,17 @@ The IntelliJ IDE supports Maven out of the box and offers a plugin for Scala dev

### Eclipse Scala IDE

We recommend using Scala IDE 3.0.3, based on Eclipse Kepler. While this is a slightly older version,
For Eclipse users, we recommend using Scala IDE 3.0.3, based on Eclipse Kepler. While this is a slightly older version,
we found it to be the verstion that works most robustly for a complex project like Flink.

Further details, and a guide to newer Scala IDE versions can be found in the
[How to setup Eclipse](https://github.com/StephanEwen/incubator-flink/blob/master/docs/internal_setup_eclipse.md) docs.
[How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internal_setup_eclipse.md) docs.

**Note:** Before following this setup, make sure to run the build from the command line once
(`mvn clean package -DskipTests`, see above)

1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See [How to setup Eclipse](apache/incubator-flink/blob/master/docs/internal_setup_eclipse.md)
for download links and instructions.
1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See
[How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internal_setup_eclipse.md) for download links and instructions.
2. Add the "macroparadise" compiler plugin to the Scala compiler.
Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
Expand All @@ -86,25 +86,26 @@ Further details, and a guide to newer Scala IDE versions can be found in the

Don’t hesitate to ask!

Please contact the developers on our [mailing lists](http:https://flink.incubator.apache.org/community.html#mailing-lists) if you need help.
Please contact the developers on our [mailing lists](http:https://flink.apache.org/community.html#mailing-lists) if you need help.

[Open an issue](https://issues.apache.org/jira/browse/FLINK) if you found a bug in Flink.


## Documentation

The documentation of Apache Flink is located on the website: [http:https://flink.incubator.apache.org](http:https://flink.incubator.apache.org)
The documentation of Apache Flink is located on the website: [http:https://flink.apache.org](http:https://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](http:https://flink.incubator.apache.org/how-to-contribute.html).
This article describes [how to contribute to Apache Flink](http:https://flink.apache.org/how-to-contribute.html).


## About

Apache Flink is an open source project of The Apache Software Foundation (ASF).
The Apache Flink project originated from the [Stratosphere](http:https://stratosphere.eu) research project.

20 changes: 10 additions & 10 deletions docs/internal_job_scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ parallism of 3. A pipeline consists of the sequence Source - Map - Reduce. On a
<img src="img/slots.svg" alt="Assigning Pipelines of Tasks to Slots" height="250px" style="text-align: center;"/>
</div>

Internally, Flink defines through [SlotSharingGroup](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotSharingGroup.java)
and [CoLocationGroup](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/CoLocationGroup.java)
Internally, Flink defines through {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/SlotSharingGroup.java "SlotSharingGroup" %}
and {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/CoLocationGroup.java "CoLocationGroup" %}
which tasks may share a slot (permissive), respectively which tasks must be strictly placed into the same slot.


Expand All @@ -54,26 +54,26 @@ which tasks may share a slot (permissive), respectively which tasks must be stri
During job execution, the JobManager keeps track of distributed tasks, decides when to schedule the next task (or set of tasks),
and reacts to finished tasks or execution failures.

The JobManager receives the [JobGraph](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/),
which is a representation of the data flow consisting of operators ([JobVertex](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/AbstractJobVertex.java))
and intermediate results ([IntermediateDataSet](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/IntermediateDataSet.java)).
The JobManager receives the {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/ "JobGraph" %},
which is a representation of the data flow consisting of operators ({% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/AbstractJobVertex.java "JobVertex" %})
and intermediate results ({% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/IntermediateDataSet.java "IntermediateDataSet" %}).
Each operator has properies, like the degree of parallelism and the code that it executes.
In addition, the JobGraph has a set of attached libraries, that are neccessary to execute the code of the operators.

The JobManager transforms the JobGraph into an [ExecutionGraph](https://github.com/apache/incubator-flink/tree/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph).
The ExecutionGraph is a parallel version of the JobGraph: For each JobVertex, it contains an [ExecutionVertex](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java) per parallel subtask. An operator with a parallelism of 100 will have one JobVertex and 100 ExecutionVertices.
The JobManager transforms the JobGraph into an {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ "ExecutionGraph" %}.
The ExecutionGraph is a parallel version of the JobGraph: For each JobVertex, it contains an {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java "ExecutionVertex" %} per parallel subtask. An operator with a parallelism of 100 will have one JobVertex and 100 ExecutionVertices.
The ExecutionVertex tracks the state of execution of a particular subtask. All ExecutionVertices from one JobVertex are held in an
[ExecutionJobVertex](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java),
{% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java "ExecutionJobVertex" %},
which tracks the status of the operator as a whole.
Besides the vertices, the ExecutionGraph also contains the [IntermediateResult](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/IntermediateResult.java) and the [IntermediateResultPartition](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/IntermediateResultPartition.java). The former tracks the state of the *IntermediateDataSet*, the latter the state of each of its partitions.
Besides the vertices, the ExecutionGraph also contains the {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/IntermediateResult.java "IntermediateResult" %} and the {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/IntermediateResultPartition.java "IntermediateResultPartition" %}. The former tracks the state of the *IntermediateDataSet*, the latter the state of each of its partitions.

<div style="text-align: center;">
<img src="img/job_and_execution_graph.svg" alt="JobGraph and ExecutionGraph" height="400px" style="text-align: center;"/>
</div>

During its execution, each parallel task goes through multiple stages, from *created* to *finished* or *failed*. The diagram below illustrates the
states and possible transitions between them. A task may be executed multiple times (for example in the course of failure recovery).
For that reason, the execution of an ExecutionVertex is tracked in an [Execution](https://github.com/apache/incubator-flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java). Each ExecutionVertex has a current Execution, and prior Executions.
For that reason, the execution of an ExecutionVertex is tracked in an {% gh_link /flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java "Execution" %}. Each ExecutionVertex has a current Execution, and prior Executions.

<div style="text-align: center;">
<img src="img/state_machine.svg" alt="States and Transitions of Task Executions" height="300px" style="text-align: center;"/>
Expand Down

0 comments on commit 7f659f6

Please sign in to comment.