macksonmu commented on code in PR #1866:
URL:
https://github.com/apache/incubator-streampark/pull/1866#discussion_r1001896066
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/VariableServiceImpl.java:
##########
@@ -79,4 +110,74 @@ public Variable findByVariableCode(Long teamId, String
variableCode) {
public List<Variable> findByTeamId(Long teamId) {
return baseMapper.selectByTeamId(teamId);
}
+
+ /**
+ * Replace placeholders with defined variable codes.
+ * @param teamId
+ * @param paramWithPlaceholders Parameters with placeholders, e.g.
"--cluster ${kafka.cluster}"
+ * @return
+ */
+ @Override
+ public String parseVariable(Long teamId, String paramWithPlaceholders) {
Review Comment:
Change variables to uppercase
private final Pattern PLACEHOLDER_PATTERN =
Pattern.compile("\\$\\{([A-Za-z])+([A-Za-z0-9._-])+\\}");
private final String PLACEHOLDER_START = "${";
private final String PLACEHOLDER_END = "}";
--
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]