This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.3 by this push:
new 480446921 [BUG] Fix flink lib to exclude dependencies that do not end
in.jar #3568
480446921 is described below
commit 480446921db95c21fd43bf064d1b94a71bc995bb
Author: benjobs <[email protected]>
AuthorDate: Fri Feb 23 22:54:57 2024 +0800
[BUG] Fix flink lib to exclude dependencies that do not end in.jar #3568
---
.../org/apache/streampark/flink/proxy/FlinkShimsProxy.scala | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
a/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
b/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
index 3cf8ae250..8548fcd15 100644
---
a/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
+++
b/streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala
@@ -165,10 +165,7 @@ object FlinkShimsProxy extends Logger {
val libURL = getFlinkHomeLib(
flinkVersion.flinkHome,
"lib",
- file => {
- val name = file.getName.toLowerCase
- name.endsWith(".jar") && !name.startsWith("log4j")
- }
+ !_.getName.toLowerCase.startsWith("log4j")
)
val shimsUrls = ListBuffer[URL](libURL: _*)
@@ -197,7 +194,11 @@ object FlinkShimsProxy extends Logger {
filterFun: File => Boolean): List[URL] = {
val file = new File(flinkHome, childDir)
require(file.isDirectory, s"FLINK_HOME $file does not exist")
- file.listFiles.filter(filterFun).map(_.toURI.toURL).toList
+ file.listFiles
+ .filter(filterFun)
+ .filter(_.getName.toLowerCase.endsWith(".jar"))
+ .map(_.toURI.toURL)
+ .toList
}
@throws[Exception]