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 C23BB18E85 for ; Wed, 1 Jul 2015 10:00:57 +0000 (UTC) Received: (qmail 31945 invoked by uid 500); 1 Jul 2015 10:00:57 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 31801 invoked by uid 500); 1 Jul 2015 10:00:57 -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 30057 invoked by uid 99); 1 Jul 2015 10:00:54 -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, 01 Jul 2015 10:00:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6D6E7DFE60; Wed, 1 Jul 2015 10:00:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mxm@apache.org To: commits@flink.apache.org Date: Wed, 01 Jul 2015 10:01:26 -0000 Message-Id: <52507e5e3fe24a4cbfdc51b535ccac93@git.apache.org> In-Reply-To: <95c9a832237542c79e03e02b1c353d3f@git.apache.org> References: <95c9a832237542c79e03e02b1c353d3f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [34/54] [partial] flink-web git commit: Revert "[hotfix] Manual build of docs" http://git-wip-us.apache.org/repos/asf/flink-web/blob/f0ac0cdb/content/docs/0.9/internals/ide_setup.html ---------------------------------------------------------------------- diff --git a/content/docs/0.9/internals/ide_setup.html b/content/docs/0.9/internals/ide_setup.html deleted file mode 100644 index 4267b4d..0000000 --- a/content/docs/0.9/internals/ide_setup.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - Apache Flink 0.9.0 Documentation: IDE setup - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-

IDE setup

- - - - - -

Eclipse

- -

A brief guide how to set up Eclipse for development of the Flink core. -Flink uses mixed Scala/Java projects, which pose a challenge to some IDEs. -Below is the setup guide that works best from our personal experience.

- -

For Eclipse users, we currently recomment the Scala IDE 3.0.3, as the most robust solution.

- -

Eclipse Scala IDE 3.0.3

- -

NOTE: While this version of the Scala IDE is not the newest, we have found it to be the most reliably working -version for complex projects like Flink. One restriction is, though, that it works only with Java 7, not with Java 8.

- -

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

- -
    -
  1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See section below for download links -and instructions.
  2. -
  3. 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”). -Note: If you do not have the jar file, you probably did not ran the command line build.
  4. -
  5. Import the Flink Maven projects (“File” -> “Import” -> “Maven” -> “Existing Maven Projects”)
  6. -
  7. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
  8. -
  9. Close the “flink-java8” project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
  10. -
- - - -

The Scala IDE 3.0.3 is a previous stable release, and download links are a bit hidden.

- -

The pre-packaged Scala IDE can be downloaded from the following links:

- - - -

Alternatively, you can download Eclipse Kepler from https://eclipse.org/downloads/packages/release/Kepler/SR2 -and manually add the Scala and Maven plugins by plugin site at http://scala-ide.org/download/prev-stable.html.

- -
    -
  • Either use the update site to install the plugin (“Help” -> “Install new Software”)
  • -
  • Or download the zip file, unpack it, and move the contents of the -“plugins” and “features” folders into the equally named folders of the Eclipse root directory
  • -
- -

Eclipse Scala IDE 4.0.0

- -

NOTE: From personal experience, the use of the Scala IDE 4.0.0 performs worse than previous versions for complex projects like Flink. -Version 4.0.0 does not handle mixed Java/Scala projects as robustly and it frequently raises incorrect import and type errors.

- -

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

- -
    -
  1. Download the Scala IDE: http://scala-ide.org/download/sdk.html
  2. -
  3. Import the Flink Maven projects (File -> Import -> Maven -> Existing Maven Projects)
  4. -
  5. While importing the Flink project, the IDE may ask you to install an additional maven build helper plugin.
  6. -
  7. After the import, you need to set the Scala version of your projects to Scala 2.10 (from the default 2.11). -To do that, select all projects that contain Scala code (marked by the small S on the project icon), -right click and select “Scala -> Set the Scala Installation” and pick “2.10.4”. -Currently, the project to which that is relevant are “flink-runtime”, “flink-scala”, “flink-scala-examples”, -“flink-streaming-example”, “flink-streaming-scala”, “flink-tests”, “flink-test-utils”, and “flink-yarn”.
  8. -
  9. Depending on your version of the Scala IDE, you may need to 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”)
  10. -
  11. In order to compile the “flink-java-8” project, you may need to add a Java 8 execution environment. -See this post -for details.
  12. -
- -

IntelliJ IDEA

- -

A brief guide on how to set up IntelliJ IDEA IDE for development of the Flink core. -As Eclipse is known to have issues with mixed Scala and Java projects, more and more contributers are migrating to IntelliJ IDEA.

- -

The following documentation describes the steps to setup IntelliJ IDEA 14.0.3 (https://www.jetbrains.com/idea/download/) with the Flink sources.

- -

Prior to doing anything, make sure that the Flink project is built at least once from the terminal: -mvn clean package -DskipTests

- -

Installing the Scala plugin

-
    -
  1. Go to IntelliJ plugins settings (File -> Settings -> Plugins) and click on “Install Jetbrains plugin…”.
  2. -
  3. Select and install the “Scala” plugin.
  4. -
  5. Restart IntelliJ
  6. -
- -

Installing the Scala compiler plugin

-
    -
  1. Go to IntelliJ scala compiler settings (File -> Settings -> Build, Execution, Deployment -> Compiler -> Scala Compiler) and click on “Install Jetbrains plugin…”.
  2. -
  3. Click on the green plus icon on the right to add a compiler plugin
  4. -
  5. Point to the paradise jar: ~/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar If there is no such file, this means that you should build Flink from the terminal as explained above.
  6. -
- - -
    -
  1. Start IntelliJ IDEA and choose “Import Project”
  2. -
  3. Select the root folder of the Flink repository
  4. -
  5. Choose “Import project from external model” and select “Maven”
  6. -
  7. Leave the default options and finish the import.
  8. -
- -
- -
- -
-
-
- -
- - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/flink-web/blob/f0ac0cdb/content/docs/0.9/internals/index.html ---------------------------------------------------------------------- diff --git a/content/docs/0.9/internals/index.html b/content/docs/0.9/internals/index.html deleted file mode 100644 index c81c9e5..0000000 --- a/content/docs/0.9/internals/index.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - Apache Flink 0.9.0 Documentation: Internals - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-

Internals

- - - -
- -
- -
-
-
- -
- - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/flink-web/blob/f0ac0cdb/content/docs/0.9/internals/job_scheduling.html ---------------------------------------------------------------------- diff --git a/content/docs/0.9/internals/job_scheduling.html b/content/docs/0.9/internals/job_scheduling.html deleted file mode 100644 index 1f1cbde..0000000 --- a/content/docs/0.9/internals/job_scheduling.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - Apache Flink 0.9.0 Documentation: Jobs and Scheduling - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-

Jobs and Scheduling

- - - -

This document briefly describes how Flink schedules jobs and -how it represents and tracks job status on the JobManager.

- - - -

Scheduling

- -

Execution resources in Flink are defined through Task Slots. Each TaskManager will have one or more task slots, -each of which can run one pipeline of parallel tasks. A pipeline consists of multiple successive tasks, such as the -n-th parallel instance of a MapFunction together with the n-th parallel instance of a ReduceFunction. -Note that Flink often executes successive tasks concurrently: For Streaming programs, that happens in any case, -but also for batch programs, it happens frequently.

- -

The figure below illustrates that. Consider a program with a data source, a MapFunction, and a ReduceFunction. -The source and MapFunction are executed with a parallelism of 4, while the ReduceFunction is executed with a -parallism of 3. A pipeline consists of the sequence Source - Map - Reduce. On a cluster with 2 TaskManagers with -3 slots each, the program will be executed as described below.

- -
-Assigning Pipelines of Tasks to Slots -
- -

Internally, Flink defines through SlotSharingGroup -and CoLocationGroup -which tasks may share a slot (permissive), respectively which tasks must be strictly placed into the same slot.

- -

JobManager Data Structures

- -

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, -which is a representation of the data flow consisting of operators (JobVertex) -and intermediate results (IntermediateDataSet). -Each operator has properies, like the 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. -The ExecutionGraph is a parallel version of the JobGraph: For each JobVertex, it contains an 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, -which tracks the status of the operator as a whole. -Besides the vertices, the ExecutionGraph also contains the IntermediateResult and the IntermediateResultPartition. The former tracks the state of the IntermediateDataSet, the latter the state of each of its partitions.

- -
-JobGraph and ExecutionGraph -
- -

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. Each ExecutionVertex has a current Execution, and prior Executions.

- -
-States and Transitions of Task Executions -
- - -
- -
- -
-
-
- -
- - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/flink-web/blob/f0ac0cdb/content/docs/0.9/internals/logging.html ---------------------------------------------------------------------- diff --git a/content/docs/0.9/internals/logging.html b/content/docs/0.9/internals/logging.html deleted file mode 100644 index a02a88c..0000000 --- a/content/docs/0.9/internals/logging.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - Apache Flink 0.9.0 Documentation: How to use logging - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-

How to use logging

- - - -

The logging in Flink is implemented using the slf4j logging interface. As underlying logging framework, log4j is used. We also provide logback configuration files and pass them to the JVM’s as properties. Users willing to use logback instead of log4j can just exclude log4j (or delete it from the lib/ folder).

- - - -

Configuring Log4j

- -

Log4j is controlled using property files. In Flink’s case, the file is usually called log4j.properties. We pass the filename and location of this file using the -Dlog4j.configuration= parameter to the JVM.

- -

Configuring logback

- -

For users and developers alike it is important to control the logging framework. -The configuration of the logging framework is exclusively done by configuration files. -The configuration file either has to be specified by setting the environment property -Dlogback.configurationFile=<file> or by putting logback.xml in the classpath. -The conf directory contains a logback.xml file which can be modified and is used if Flink is started outside of an IDE and with the provided starting scripts. -The provided logback.xml has the following form:

- -
<configuration>
-    <appender name="file" class="ch.qos.logback.core.FileAppender">
-        <file>${log.file}</file>
-        <append>false</append>
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <root level="INFO">
-        <appender-ref ref="file"/>
-    </root>
-</configuration>
- -

In order to control the logging level of org.apache.flink.runtime.jobgraph.JobGraph, for example, one would have to add the following line to the configuration file.

- -
<logger name="org.apache.flink.runtime.jobgraph.JobGraph" level="DEBUG"/>
- -

For further information on configuring logback see LOGback’s manual.

- -

Best practices for developers

- -

The loggers using slf4j are created by calling

- -
import org.slf4j.LoggerFactory
-import org.slf4j.Logger
-
-Logger LOG = LoggerFactory.getLogger(Foobar.class)
- -

In order to benefit most from slf4j, it is recommended to use its placeholder mechanism. -Using placeholders allows to avoid unnecessary string constructions in case that the logging level is set so high that the message would not be logged. -The syntax of placeholders is the following:

- -
LOG.info("This message contains {} placeholders. {}", 2, "Yippie");
- -

Placeholders can also be used in conjunction with exceptions which shall be logged.

- -
catch(Exception exception){
-	LOG.error("An {} occurred.", "error", exception);
-}
- -
- -

This documentation is maintained by the contributors of the individual components. -We kindly ask anyone that adds and changes components to eventually provide a patch -or pull request that updates these documents as well.

- - -
- -
- -
-
-
- -
- - - - - - - - - - - - - -