Skip to content

Commit

Permalink
[BUG] Fix flink lib to exclude dependencies that do not end in.jar #3568
Browse files Browse the repository at this point in the history
  • Loading branch information
benjobs committed Feb 23, 2024
1 parent 003c888 commit 4804469
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: _*)
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 4804469

Please sign in to comment.