Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-15298][docs] Fix dependences in the DataStream API Tutorial doc #10607

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 20 additions & 7 deletions docs/getting-started/tutorials/datastream_api.md
Expand Up @@ -96,17 +96,12 @@ use it in our program. Edit the `dependencies` section of the `pom.xml` so that
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-wikiedits_2.11</artifactId>
<artifactId>flink-connector-wikiedits_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -336,6 +331,24 @@ use the Kafka sink. Add this to the `pom.xml` file in the dependencies section:
</dependency>
{% endhighlight %}

Also, set the maven dependency scope of `flink-java` and `flink-streaming-java_${scala.binary.version}` to `provided`
because those classes are provided in the cluster and they should not be packaged into the JAR file:

{% highlight xml %}
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope> <!-- the line to be added -->
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<scope>provided</scope> <!-- the line to be added -->
</dependency>
{% endhighlight %}

Next, we need to modify our program. We'll remove the `print()` sink and instead use a
Kafka sink. The new code looks like this:

Expand Down
27 changes: 20 additions & 7 deletions docs/getting-started/tutorials/datastream_api.zh.md
Expand Up @@ -96,17 +96,12 @@ use it in our program. Edit the `dependencies` section of the `pom.xml` so that
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-wikiedits_2.11</artifactId>
<artifactId>flink-connector-wikiedits_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -336,6 +331,24 @@ use the Kafka sink. Add this to the `pom.xml` file in the dependencies section:
</dependency>
{% endhighlight %}

Also, set the maven dependency scope of `flink-java` and `flink-streaming-java_${scala.binary.version}` to `provided`
because those classes are provided in the cluster and they should not be packaged into the JAR file:

{% highlight xml %}
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope> <!-- the line to be added -->
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<scope>provided</scope> <!-- the line to be added -->
</dependency>
{% endhighlight %}

Next, we need to modify our program. We'll remove the `print()` sink and instead use a
Kafka sink. The new code looks like this:

Expand Down