Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d835620

Browse files
author
Junyao Huang
committedAug 18, 2022
Add Flink Example
1 parent 34c5988 commit d835620

File tree

6 files changed

+144
-0
lines changed

6 files changed

+144
-0
lines changed
 

‎flink-streaming-example/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.eslintcache
2+
.cache
3+
scalastyle-output.xml
4+
.classpath
5+
.idea/*
6+
.metadata
7+
.settings
8+
.project
9+
.version.properties
10+
filter.properties
11+
logs.zip
12+
target
13+
tmp
14+
*.class
15+
*.iml
16+
*.swp
17+
*.jar
18+
*.zip
19+
*.log
20+
*.pyc
21+
.DS_Store
22+
build-target
23+
dependency-reduced-pom.xml

‎flink-streaming-example/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM flink:1.15.0-scala_2.12-java8
2+
3+
RUN mkdir -p $FLINK_HOME/usrlib
4+
COPY target/flink-streaming-example-1.0-SNAPSHOT.jar $FLINK_HOME/usrlib/flink-streaming-example-1.0-SNAPSHOT.jar

‎flink-streaming-example/pom.xml

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.microsoft.flink</groupId>
8+
<artifactId>flink-streaming-example</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14+
<flink.version>1.15.0</flink.version>
15+
<scala.binary.version>2.12</scala.binary.version>
16+
<!-- Fat Jar -->
17+
<maven.shade.plugin.version>3.3.0</maven.shade.plugin.version>
18+
<!-- JDK Version -->
19+
<maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
20+
</properties>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.apache.flink</groupId>
25+
<artifactId>flink-statebackend-rocksdb</artifactId>
26+
<version>${flink.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.apache.flink</groupId>
30+
<artifactId>flink-java</artifactId>
31+
<version>${flink.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.apache.flink</groupId>
35+
<artifactId>flink-clients</artifactId>
36+
<version>${flink.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.apache.flink</groupId>
40+
<artifactId>flink-streaming-java</artifactId>
41+
<version>${flink.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.apache.flink</groupId>
45+
<artifactId>flink-table-common</artifactId>
46+
<version>${flink.version}</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.apache.flink</groupId>
50+
<artifactId>flink-table-api-java-bridge</artifactId>
51+
<version>${flink.version}</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.flink</groupId>
55+
<artifactId>flink-test-utils</artifactId>
56+
<version>${flink.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.apache.flink</groupId>
60+
<artifactId>flink-json</artifactId>
61+
<version>${flink.version}</version>
62+
</dependency>
63+
</dependencies>
64+
65+
<build>
66+
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-shade-plugin</artifactId>
70+
<version>${maven.shade.plugin.version}</version>
71+
<configuration>
72+
<filters>
73+
<filter>
74+
<artifact>*:*</artifact>
75+
<excludes>
76+
<exclude>module-info.class</exclude>
77+
<exclude>META-INF/*.SF</exclude>
78+
<exclude>META-INF/*.DSA</exclude>
79+
<exclude>META-INF/*.RSA</exclude>
80+
</excludes>
81+
</filter>
82+
</filters>
83+
<transformers>
84+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
85+
<mainClass>com.microsoft.flink.FlinkStreamingExample</mainClass>
86+
</transformer>
87+
</transformers>
88+
</configuration>
89+
<executions>
90+
<execution>
91+
<phase>package</phase>
92+
<goals>
93+
<goal>shade</goal>
94+
</goals>
95+
</execution>
96+
</executions>
97+
</plugin>
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-compiler-plugin</artifactId>
101+
<version>${maven.compiler.plugin.version}</version>
102+
<configuration>
103+
<source>8</source>
104+
<target>8</target>
105+
</configuration>
106+
</plugin>
107+
</plugins>
108+
</build>
109+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.microsoft.flink;
2+
3+
public class FlinkStreamingExample {
4+
}

‎flink-streaming-example/src/main/resources/flink.properties

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.microsoft.flink;
2+
3+
public class FlinkStreamExampleTest {
4+
}

0 commit comments

Comments
 (0)
Please sign in to comment.