Skip to content

Commit 6553c49

Browse files
committed
add Pravega, Flink and Scala versions
1 parent e5b9c0d commit 6553c49

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

documentation/src/docs/dev-guide.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1717
See the License for the specific language governing permissions and
1818
limitations under the License.
1919
-->
20+
import versions from '@site/versions';
2021

2122
# Flink Connector - Dev Guide
2223

@@ -26,7 +27,7 @@ Learn how to build your own applications that using Flink connector for Pravega.
2627

2728
To complete this guide, you need:
2829

29-
* JDK 8 or 11 installed with JAVA_HOME configured appropriately
30+
* JDK 8 or 11 installed with `JAVA_HOME` configured appropriately
3031
* Pravega running(Check [here](https://pravega.io/docs/latest/getting-started/) to get started with Pravega)
3132
* Use Gradle or Maven
3233

@@ -38,12 +39,12 @@ However, you can go straight to the completed example at [flink-connector-exampl
3839

3940
# Starting Flink
4041

41-
Download Flink release and un-tar it. We use Flink 1.11.2 here.
42+
<p>Download Flink release and un-tar it. We use Flink {versions.flink} here.</p>
4243

43-
```bash
44-
$ tar -xzf flink-1.11.2-bin-scala_2.12.tgz
45-
$ cd flink-1.11.2-bin-scala_2.12
46-
```
44+
<pre><code {...{ "className": "language-bash"}}>
45+
{`$ tar -xzf flink-${versions.flink}-bin-scala_${versions.scala}.tgz
46+
$ cd flink-${versions.flink}-bin-scala_${versions.scala}`}
47+
</code></pre>
4748

4849
Start a cluster
4950

@@ -70,11 +71,11 @@ You can follow [here](https://ci.apache.org/projects/flink/flink-docs-stable/dev
7071

7172
Add the below snippet to dependencies section of build.gradle in the app directory, connector dependencies should be part of the shadow jar. For flink connector dependency, we need to choose the connector which aligns the Flink major version and Scala version if you use Scala, along with the same Pravega version you run.
7273

73-
```groovy
74-
compile group 'org.apache.flink', name: 'flink-streaming-java_2.12', version: '1.11.2'
74+
<pre><code {...{ "className": "language-groovy" }}>
75+
{`compile group 'org.apache.flink', name: 'flink-streaming-java_${versions.scala}', version: '${versions.flink}'
7576

76-
flinkShadowJar group: 'io.pravega', name: 'pravega-connectors-flink-1.11_2.12', version: '0.9.0'
77-
```
77+
flinkShadowJar group: 'io.pravega', name: 'pravega-connectors-flink-${versions['flink-minor']}_${versions.scala}', version: '${versions['flink-connectors']}'`}
78+
</code></pre>
7879

7980
Define custom configurations `flinkShadowJar`
8081

@@ -99,20 +100,20 @@ You can check [maven-quickstart](https://ci.apache.org/projects/flink/flink-docs
99100

100101
Add below dependencies into Maven POM, these dependencies should be part of the shadow jar
101102

102-
```xml
103-
<dependency>
103+
<pre><code {...{ "className": "language-xml" }}>
104+
{`<dependency>
104105
<groupId>org.apache.flink</groupId>
105-
<artifactId>flink-streaming-java_2.12</artifactId>
106-
<version>1.11.2</version>
106+
<artifactId>flink-streaming-java_${versions.scala}</artifactId>
107+
<version>${versions['flink']}</version>
107108
<scope>provided</scope>
108109
</dependency>
109110

110111
<dependency>
111112
<groupId>io.pravega</groupId>
112-
<artifactId>pravega-connectors-flink-1.11_2.12</artifactId>
113-
<version>0.9.0</version>
114-
</dependency>
115-
```
113+
<artifactId>pravega-connectors-flink-${versions['flink-minor']}_${versions.scala}</artifactId>
114+
<version>${versions['flink-connectors']}</version>
115+
</dependency>`}
116+
</code></pre>
116117

117118
Invoke `mvn clean package` to build/package your project. You will find a JAR file that contains your application, plus connectors and libraries that you may have added as dependencies to the application: `target/<artifact-id>-<version>.jar`.
118119

@@ -220,4 +221,4 @@ flink run -c <classname> ${your-app}.jar --controller <pravega-controller-uri>
220221

221222
# What’s next?
222223

223-
This guide covered the creation of a application that uses Flink connector to read and wirte from a pravega stream. However, there is much more. We recommend continuing the journey by going through [flink connector documents](https://pravega.io/docs/latest/connectors/flink-connector/) and check other examples on [flink-connector-examples](https://github.com/pravega/pravega-samples/tree/master/flink-connector-examples).
224+
This guide covered the creation of a application that uses Flink connector to read and wirte from a pravega stream. However, there is much more. We recommend continuing the journey by going through [flink connector documents](overview) and check other examples on [flink-connector-examples](https://github.com/pravega/pravega-samples/tree/master/flink-connector-examples).

documentation/src/docs/quickstart.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1717
See the License for the specific language governing permissions and
1818
limitations under the License.
1919
-->
20+
import versions from '@site/versions';
2021

2122
## Creating a Flink Stream Processing Project
2223

@@ -33,8 +34,8 @@ Once after the set up, please follow the below instructions to add the **Flink P
3334

3435
To add the Pravega connector dependencies to your project, add the following entry to your project file: (For example, `pom.xml` for Maven)
3536

36-
```xml
37-
<!-- Before Pravega 0.6 -->
37+
<pre><code {...{ "className": "language-xml" }}>
38+
{`<!-- Before Pravega 0.6 -->
3839
<dependency>
3940
<groupId>io.pravega</groupId>
4041
<artifactId>pravega-connectors-flink_2.12</artifactId>
@@ -44,12 +45,13 @@ To add the Pravega connector dependencies to your project, add the following ent
4445
<!-- Pravega 0.6 and After -->
4546
<dependency>
4647
<groupId>io.pravega</groupId>
47-
<artifactId>pravega-connectors-flink-1.9_2.12</artifactId>
48-
<version>0.6.0</version>
49-
</dependency>
50-
```
48+
<artifactId>pravega-connectors-flink-${versions['flink-minor']}_${versions.scala}</artifactId>
49+
<version>${versions['flink-connectors']}</version>
50+
</dependency>`}
51+
</code></pre>
52+
53+
<p>Use appropriate version as necessary. <code>{versions['flink-minor']}</code> is the Flink Major-Minor version. <code>{versions.scala}</code> is the Scala version. <code>{versions.pravega}</code> is the Pravega version.</p>
5154

52-
Use appropriate version as necessary. `1.9` is the Flink Major-Minor version. `2.12` is the Scala version. `0.6.0` is the Pravega version.
5355
The snapshot versions are published to [`GitHub Packages`](https://github.com/orgs/pravega/packages) repository and the release artifacts are available in [`Maven Central`](https://mvnrepository.com/artifact/io.pravega/pravega-connectors-flink) repository.
5456

5557
Alternatively, we could build and publish the connector artifacts to local maven repository by executing the following command and make use of that version as your application dependency.

0 commit comments

Comments
 (0)