incubator-streampark
incubator-streampark copied to clipboard
[Bug] env.java.opts on yarn not effict
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
env.java.opts on yarn application模式下不生效
StreamPark Version
1.2.3
Java Version
1.8
Flink Version
1.13.6
Scala Version of Flink
2.12
Error Exception
配置不生效
Screenshots
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@Nonnull def extractDynamicOption(dynamicOptions: String): Map[String, String] = { if (StringUtils.isEmpty(dynamicOptions)) { Map.empty[String, String] } else { dynamicOptions.split("\s?-D") match { case x if Utils.isEmpty(x) => Map.empty case d => d.filter(.nonEmpty) .map(.trim) .map(DYNAMIC_OPTION_ITEM_PATTERN.matcher()) .filter(.matches) .map(m => m.group(1) -> m.group(2).replace(""", "").trim) .toMap } } } 由于value中包含-D 字符,导致-Denv.java.opts="-Dfile.encoding=UTF-8" 拆分失败, 修改方式,排除双引号中的-D即可,如下: 由“\s?-D” 改成“\s?-D(?=(?:[^"]"[^"]")[^"]$)” 即可
