This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 0dca879c0 [hotfix][flink-1.13] fix flink example NPE &
NoSuchMethodError (#2589)
0dca879c0 is described below
commit 0dca879c046136efda143643d0577d3d6c5675c2
Author: Zongwen Li <[email protected]>
AuthorDate: Thu Sep 1 16:36:33 2022 +0800
[hotfix][flink-1.13] fix flink example NPE & NoSuchMethodError (#2589)
---
seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml | 5 -----
.../translation/flink/source/BaseSeaTunnelSourceFunction.java | 6 ++++--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
b/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
index 212646b3d..d9eb08874 100644
--- a/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
+++ b/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
@@ -76,11 +76,6 @@
<artifactId>connector-dingtalk</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-datahub</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- seatunnel connectors -->
<!--flink-->
diff --git
a/seatunnel-translation/seatunnel-translation-flink/src/main/java/org/apache/seatunnel/translation/flink/source/BaseSeaTunnelSourceFunction.java
b/seatunnel-translation/seatunnel-translation-flink/src/main/java/org/apache/seatunnel/translation/flink/source/BaseSeaTunnelSourceFunction.java
index e91a73ed4..79860a901 100644
---
a/seatunnel-translation/seatunnel-translation-flink/src/main/java/org/apache/seatunnel/translation/flink/source/BaseSeaTunnelSourceFunction.java
+++
b/seatunnel-translation/seatunnel-translation-flink/src/main/java/org/apache/seatunnel/translation/flink/source/BaseSeaTunnelSourceFunction.java
@@ -102,8 +102,10 @@ public abstract class BaseSeaTunnelSourceFunction extends
RichSourceFunction<Row
public void cancel() {
running = false;
try {
- LOG.debug("Cancel the SeaTunnelSourceFunction of Flink.");
- internalSource.close();
+ if (internalSource != null) {
+ LOG.debug("Cancel the SeaTunnelSourceFunction of Flink.");
+ internalSource.close();
+ }
} catch (Exception e) {
throw new RuntimeException(e);
}