You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/src/docs/dev-guide.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
17
See the License for the specific language governing permissions and
18
18
limitations under the License.
19
19
-->
20
+
import versions from '@site/versions';
20
21
21
22
# Flink Connector - Dev Guide
22
23
@@ -26,7 +27,7 @@ Learn how to build your own applications that using Flink connector for Pravega.
26
27
27
28
To complete this guide, you need:
28
29
29
-
* JDK 8 or 11 installed with JAVA_HOME configured appropriately
30
+
* JDK 8 or 11 installed with `JAVA_HOME` configured appropriately
30
31
* Pravega running(Check [here](https://pravega.io/docs/latest/getting-started/) to get started with Pravega)
31
32
* Use Gradle or Maven
32
33
@@ -38,12 +39,12 @@ However, you can go straight to the completed example at [flink-connector-exampl
38
39
39
40
# Starting Flink
40
41
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>
42
43
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>
47
48
48
49
Start a cluster
49
50
@@ -70,11 +71,11 @@ You can follow [here](https://ci.apache.org/projects/flink/flink-docs-stable/dev
70
71
71
72
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.
72
73
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}'
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`.
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).
<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>
51
54
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.
53
55
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.
54
56
55
57
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