Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d2e28ea
[Build] Raise StreamPark compile and CI baseline to JDK 11
shangeyao Jul 1, 2026
8afc897
[Common] Fix ClassLoaderUtils dynamic classpath on JDK 9+
shangeyao Jul 1, 2026
beea01a
[Console] JDK 11 runtime readiness for StreamPark Console
shangeyao Jul 1, 2026
fbc1fc7
[Build][E2E] Fix JDK 11 MavenWrapper and stabilize local basic E2E
shangeyao Jul 1, 2026
2322bd5
[Build] Remove Scala on JDK 11 baseline for StreamPark 3.0
shangeyao Jul 5, 2026
aa59773
[Flink] Drop 1.12–1.16 shims, baseline 1.17+, add 2.0/2.1/2.2 support
shangeyao Jul 5, 2026
7223836
[Build] Bump common module version to 3.0.0-preview
shangeyao Jul 7, 2026
208398e
[Build] Bump Flink module version to 3.0.0-preview
shangeyao Jul 7, 2026
15ea6cd
[Common] Fix Sonar security findings after Scala-to-Java migration
shangeyao Jul 8, 2026
4dc91ae
Merge feature/remove-scala into feature/flink-1.17-plus
shangeyao Jul 8, 2026
1f3512b
[Flink] Fix Sonar security findings in Flink modules
shangeyao Jul 8, 2026
a48bc62
[Common] Fix Sonar security findings for path handling and debug output
shangeyao Jul 8, 2026
e965f83
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
51168ec
[Common] Harden path validation and fix Sonar reliability findings
shangeyao Jul 8, 2026
72212e2
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
1660cec
[Common] Address Sonar path injection review comments
shangeyao Jul 8, 2026
efdf40b
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
752fa8a
[Common] Fix Sonar path I/O taint and reliability findings
shangeyao Jul 8, 2026
23bdbcb
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
5a1ff40
[Common] Add NOSONAR for validated config/jar path I/O
shangeyao Jul 8, 2026
16bda3d
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
2cd1f3d
[Common] Fix Sonar reliability bugs across common and flink modules
shangeyao Jul 8, 2026
f71a1a8
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
c78c1e1
[Common] Fix remaining Sonar bugs and add SonarCloud CPD exclusions
shangeyao Jul 8, 2026
d49f927
Merge branch 'feature/remove-scala' into feature/flink-1.17-plus
shangeyao Jul 8, 2026
e90b94a
[Flink] Throw IllegalArgumentException in FlinkTableInitializerV2 SQL…
shangeyao Jul 8, 2026
ea321fe
[Build] Apply Spotless formatting and fix FlinkCheckpointWatcher syntax
shangeyao Jul 8, 2026
2c52e14
[Build] Merge remove-scala Spotless fixes and align version to 3.0.0-…
shangeyao Jul 8, 2026
1010062
[CI] Sync workflow config with StreamPark 3.0 baseline
shangeyao Jul 8, 2026
4564f87
[CI] Sync workflow config with StreamPark 3.0 baseline
shangeyao Jul 8, 2026
898fcc8
[CI] Add ASF license headers and SafePathUtils Sonar ignore rules
shangeyao Jul 8, 2026
0113fae
[CI] Add ASF license headers and SafePathUtils Sonar ignore rules
shangeyao Jul 8, 2026
3743c96
[Common] Address Sonar issues after Scala-to-Java migration
shangeyao Jul 8, 2026
5504a19
Merge feature/remove-scala Sonar fixes
shangeyao Jul 8, 2026
729e40d
[Build] Align project version to 3.0.0-SNAPSHOT
shangeyao Jul 11, 2026
a7a35df
Merge branch 'dev' into feature/flink-1.17-plus
shangeyao Aug 3, 2026
0882846
[Flink] Align PR #4419 with post-Scala Java artifact model
shangeyao Aug 3, 2026
70a8feb
[Flink] Finish no-scala artifact and FlinkVersion cleanup
shangeyao Aug 3, 2026
4c5cb4c
Merge branch 'dev' into feature/flink-1.17-plus
shangeyao Aug 3, 2026
d957216
[Flink] Reduce shims duplication via layered base architecture
shangeyao Aug 3, 2026
2a36fdc
[Flink] Revert aggressive shims dedup; keep layered base reuse
shangeyao Aug 3, 2026
30473e3
[CI] Exclude Flink shims from SonarCloud duplication analysis
shangeyao Aug 3, 2026
d6f1487
[Flink] Fix SonarCloud new code smells for PR #4419
shangeyao Aug 3, 2026
1c0e587
[Flink] Refactor Sonar fixes without SuppressWarnings masking
shangeyao Aug 3, 2026
ecabd7c
[Spark] Restore streampark-spark to match dev branch
shangeyao Aug 4, 2026
29a140d
[Flink] Fix build and shims test issues from compile verification
shangeyao Aug 4, 2026
a346688
[Flink] Fix Sonar reliability bug in FlinkSqlExecutor.setConfig
shangeyao Aug 4, 2026
8d4c32b
[Build] Fix root POM full build after common artifact rename
shangeyao Aug 4, 2026
b73435b
[Build] Remove leftover connector migration script without license he…
shangeyao Aug 4, 2026
eadb96c
[Flink] Restore packer test deps and workspace config after Java migr…
shangeyao Aug 4, 2026
bd6799d
[Flink] Defer YarnPerJobTestCase init until FLINK_HOME is set
shangeyao Aug 4, 2026
e7b9c6d
[Flink] Replace YarnPerJobTestCase skip with harness compatibility ch…
shangeyao Aug 4, 2026
470b064
[Build] Remove stale scala runtime jars from known-dependencies
shangeyao Aug 4, 2026
75f0345
[Console] Restore scala runtime deps in dist assembly
shangeyao Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SonarCloud automatic analysis reads this file (not sonar-project.properties).
# Multi-version Flink shims intentionally share parallel structure per Flink release.
sonar.cpd.exclusions=**/streampark-flink-shims/**,**/streampark-flink-shims-base/**,**/streampark-flink-shims-base-v2/**,**/streampark-spark-shims/**
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<flink.version>1.20.1</flink.version>
<flink.shaded.version>1.8.1</flink.shaded.version>
<streampark.shaded.version>1.0.0</streampark.shaded.version>
<streampark.flink.shims.version>1.14</streampark.flink.shims.version>
<streampark.flink.shims.version>1.17</streampark.flink.shims.version>
<spark.version>3.1.2</spark.version>
<scalikejdbc.version>4.0.0</scalikejdbc.version>
<hive.version>2.3.4</hive.version>
Expand Down Expand Up @@ -222,7 +222,7 @@

<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<artifactId>streampark-common</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down Expand Up @@ -932,6 +932,7 @@
<exclude>src/main/resources/*.dict</exclude>

<exclude>streampark-console-webapp/**</exclude>
<exclude>streampark-console-webapp-v2/**</exclude>
</excludes>
</configuration>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion streampark-common-scala-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependencies>
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<artifactId>streampark-common</artifactId>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions streampark-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<version>${revision}</version>
</parent>

<artifactId>streampark-common_${scala.binary.version}</artifactId>
<artifactId>streampark-common</artifactId>
<name>StreamPark : Common</name>

<dependencies>
Expand Down Expand Up @@ -132,8 +132,8 @@
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>

<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
Expand All @@ -43,8 +44,11 @@ public class FlinkVersion implements Serializable {
private static final Pattern FLINK_VER_PATTERN = Pattern.compile("^(\\d+\\.\\d+)(?:\\..*)?$");
private static final Pattern FLINK_VERSION_PATTERN =
Pattern.compile("^Version: ([^,]*), Commit ID: (.*)$");
private static final Pattern FLINK_SCALA_VERSION_PATTERN =
Pattern.compile("^flink-dist_(\\d+\\.\\d+)[^/\\\\]*\\.jar$");
private static final Pattern FLINK_DIST_UNDERSCORE_PATTERN =
Pattern.compile(
"^flink-dist_(\\d+\\.\\d+)-(\\d+\\.\\d+(?:\\.\\d+)?(?:-SNAPSHOT)?)\\.jar$");
private static final Pattern FLINK_DIST_DASH_PATTERN =
Pattern.compile("^flink-dist-(\\d+\\.\\d+(?:\\.\\d+)?(?:-SNAPSHOT)?)\\.jar$");
private static final Pattern APACHE_FLINK_VERSION_PATTERN =
Pattern.compile("^(\\d+\\.\\d+\\.\\d+)");
private static final Pattern OTHER_FLINK_VERSION_PATTERN = Pattern.compile("^(\\d+\\.\\d+)-?$");
Expand Down Expand Up @@ -84,10 +88,14 @@ public String version() {
return getVersion();
}

/** Backward-compatible alias for {@link #getFlinkLibs()}. */
public List<URL> flinkLibs() throws Exception {
return getFlinkLibs();
}

public String getScalaVersion() {
if (scalaVersion == null) {
Matcher matcher = FLINK_SCALA_VERSION_PATTERN.matcher(getFlinkDistJar().getName());
scalaVersion = matcher.matches() ? matcher.group(1) : "2.12";
scalaVersion = parseFromDistJar().map(pair -> pair[1]).orElse("2.12");
}
return scalaVersion;
}
Expand Down Expand Up @@ -130,41 +138,10 @@ public List<URL> getFlinkLibs() throws Exception {

public String getVersion() {
if (version == null) {
List<String> cmd =
Arrays.asList(
"java -classpath "
+ getFlinkDistJar().getName()
+ " org.apache.flink.client.cli.CliFrontend --version");
StringBuilder buffer = new StringBuilder();
final String[] flinkVersion = {null};
try {
CommandUtils.execute(
getFlinkLib().getAbsolutePath(),
cmd,
out -> {
buffer.append(out).append("\n");
Matcher matcher = FLINK_VERSION_PATTERN.matcher(out);
if (matcher.find()) {
String ver = matcher.group(1);
Matcher m1 = APACHE_FLINK_VERSION_PATTERN.matcher(ver);
if (m1.find()) {
flinkVersion[0] = ver;
} else {
Matcher m2 = OTHER_FLINK_VERSION_PATTERN.matcher(ver);
if (m2.find()) {
flinkVersion[0] = ver;
}
}
}
});
} catch (Exception e) {
throw new IllegalStateException("[StreamPark] execute flink version command failed", e);
}
LOG.info("[StreamPark] {}", buffer);
if (flinkVersion[0] == null) {
throw new IllegalStateException("[StreamPark] parse flink version failed. " + buffer);
}
version = flinkVersion[0];
version =
parseFromDistJar()
.map(pair -> pair[0])
.orElseGet(this::parseFromCliFrontend);
}
return version;
}
Expand Down Expand Up @@ -205,10 +182,14 @@ public boolean checkVersion() {

public boolean checkVersion(boolean throwException) {
String[] parts = getVersion().split("\\.");
if (parts.length >= 2 && "1".equals(parts[0].trim())) {
if (parts.length >= 2) {
try {
int major = Integer.parseInt(parts[0].trim());
int minor = Integer.parseInt(parts[1].trim());
if (minor >= 12 && minor <= 20) {
if (major == 1 && minor >= 17 && minor <= 20) {
return true;
}
if (major == 2 && minor >= 0 && minor <= 3) {
return true;
}
} catch (NumberFormatException ignored) {
Expand All @@ -222,15 +203,88 @@ public boolean checkVersion(boolean throwException) {

public boolean checkVersion(int sinceVersion) {
String[] parts = getVersion().split("\\.");
if (parts.length >= 2 && "1".equals(parts[0].trim())) {
if (parts.length >= 2) {
try {
return Integer.parseInt(parts[1].trim()) >= sinceVersion;
int major = Integer.parseInt(parts[0].trim());
int minor = Integer.parseInt(parts[1].trim());
if (major == 1 && minor >= sinceVersion) {
return true;
}
if (major == 2) {
return true;
}
} catch (NumberFormatException ignored) {
}
}
return false;
}

private java.util.Optional<String[]> parseFromDistJar() {
String jarName = getFlinkDistJar().getName();
Matcher underscoreMatcher = FLINK_DIST_UNDERSCORE_PATTERN.matcher(jarName);
if (underscoreMatcher.matches()) {
String parsedVersion = underscoreMatcher.group(2);
String parsedScala = underscoreMatcher.group(1);
LOG.info(
"Flink version parsed from dist jar name: {}, scala: {}",
parsedVersion,
parsedScala);
return java.util.Optional.of(new String[]{parsedVersion, parsedScala});
}
Matcher dashMatcher = FLINK_DIST_DASH_PATTERN.matcher(jarName);
if (dashMatcher.matches()) {
String parsedVersion = dashMatcher.group(1);
LOG.info(
"Flink version parsed from dist jar name: {}, scala: {}",
parsedVersion,
"2.12");
return java.util.Optional.of(new String[]{parsedVersion, "2.12"});
}
return java.util.Optional.empty();
}

private String parseFromCliFrontend() {
final String[] flinkVersion = {null};
StringBuilder buffer = new StringBuilder();
List<String> cmd =
Arrays.asList(
"java -classpath "
+ getFlinkDistJar().getName()
+ " org.apache.flink.client.cli.CliFrontend --version");
try {
CommandUtils.execute(
getFlinkLib().getAbsolutePath(),
cmd,
new Consumer<String>() {

@Override
public void accept(String out) {
buffer.append(out).append("\n");
Matcher matcher = FLINK_VERSION_PATTERN.matcher(out);
if (matcher.find()) {
String ver = matcher.group(1);
Matcher m1 = APACHE_FLINK_VERSION_PATTERN.matcher(ver);
if (m1.find()) {
flinkVersion[0] = ver;
} else {
Matcher m2 = OTHER_FLINK_VERSION_PATTERN.matcher(ver);
if (m2.find()) {
flinkVersion[0] = ver;
}
}
}
}
});
} catch (Exception e) {
throw new IllegalStateException("[StreamPark] execute flink version command failed", e);
}
LOG.info("[StreamPark] {}", buffer);
if (flinkVersion[0] == null) {
throw new IllegalStateException("[StreamPark] parse flink version failed. " + buffer);
}
return flinkVersion[0];
}

@Override
public String toString() {
return "\n----------------------------------------- flink version -----------------------------------\n"
Expand Down
Loading
Loading