wolfboys commented on code in PR #1738:
URL:
https://github.com/apache/incubator-streampark/pull/1738#discussion_r990049641
##########
streampark-flink/streampark-flink-proxy/src/main/scala/org/apache/streampark/flink/proxy/FlinkShimsProxy.scala:
##########
@@ -88,10 +88,17 @@ object FlinkShimsProxy extends Logger {
SHIMS_CLASS_LOADER_CACHE.getOrElseUpdate(s"${flinkVersion.fullVersion}", {
// 1) flink/lib
- val libURL = getFlinkHomeLib(flinkVersion.flinkHome)
- val shimsUrls = ListBuffer[URL](libURL: _*)
+ def filterLib(filterLib: File): Boolean = {
+ !(filterLib.getName.startsWith("log4j") ||
filterLib.getName.startsWith("flink-table-planner-loader"))
+ }
- // 2) shims jar
+ val libURL = getFlinkHomeLib(flinkVersion.flinkHome, "lib", filterLib)
+ // 2) After version 1.15 need add flink/opt/flink-table-planner*
+ val getFlinkTablePlanner: File => Boolean =
_.getName.startsWith("flink-table-planner")
+ val tablePlannerURL = getFlinkHomeLib(flinkVersion.flinkHome, "opt",
getFlinkTablePlanner)
Review Comment:
There is no need to define variables, The code can be further simplified,
`val tablePlannerURL = getFlinkHomeLib(flinkVersion.flinkHome, "opt",
_.getName.startsWith("flink-table-planner"))`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]