wolfboys commented on code in PR #4062:
URL:
https://github.com/apache/incubator-streampark/pull/4062#discussion_r1759746362
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/FlinkEnv.java:
##########
@@ -115,11 +116,14 @@ public Map<String, String> convertFlinkYamlAsMap() {
}
@JsonIgnore
- public Properties getFlinkConfig() {
+ public Properties getFlinkConfig(Application application) {
Review Comment:
```
@JsonIgnore
public Properties getFlinkConfig(Application application) {
String flinkYamlString = DeflaterUtils.unzipString(flinkConf);
Properties flinkConfig = new Properties();
Map<String, String> config =
PropertiesUtils.loadFlinkConfYaml(flinkYamlString);
for (Map.Entry<String, String> entry : config.entrySet()) {
String value = entry.getValue();
if (StringUtils.isNotBlank(application.getJobName())) {
value =
value.replaceAll("\\$\\{job(Name|name)}|\\$job(Name|name)",
application.getJobName());
}
if (application.getId() != null) {
value = value.replaceAll("\\$\\{job(Id|id)}|\\$job(Id|id)",
application.getId().toString());
}
flinkConfig.setProperty(entry.getKey(), value);
}
return flinkConfig;
}
```
--
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]