You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/11/11 06:41:06 UTC
[GitHub] [incubator-dolphinscheduler] geosmart opened a new issue #4050: [Feature][SparkTask] SparkTask other param string need support variable inject
geosmart opened a new issue #4050:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4050
**Describe the feature**
SparkTask [others] param string current not support variable inject,
just like [mainArgs],we need to replace ${variable} in [others]
** just change like this
org.apache.dolphinscheduler.server.worker.task.spark.SparkTask.java
```java
if (StringUtils.isNotEmpty(sparkParameters.getMainArgs())) {
String args = sparkParameters.getMainArgs();
// replace placeholder
Map<String, Property> paramsMap = ParamUtils.convert(ParamUtils.getUserDefParamsMap(taskExecutionContext.getDefinedParams()),
taskExecutionContext.getDefinedParams(),
sparkParameters.getLocalParametersMap(),
CommandType.of(taskExecutionContext.getCmdTypeIfComplement()),
taskExecutionContext.getScheduleTime());
if (paramsMap != null) {
args = ParameterUtils.convertParameterPlaceholders(args, ParamUtils.convert(paramsMap));
}
sparkParameters.setMainArgs(args);
}
```
change it to
```java
if (StringUtils.isNotEmpty(sparkParameters.getMainArgs())) {
String args = sparkParameters.getMainArgs();
String others = sparkParameters.getOthers();
// replace placeholder
Map<String, Property> paramsMap = ParamUtils.convert(ParamUtils.getUserDefParamsMap(taskExecutionContext.getDefinedParams()),
taskExecutionContext.getDefinedParams(),
sparkParameters.getLocalParametersMap(),
CommandType.of(taskExecutionContext.getCmdTypeIfComplement()),
taskExecutionContext.getScheduleTime());
if (paramsMap != null) {
Map<String, String> formatParamsMap = ParamUtils.convert(paramsMap);
args = ParameterUtils.convertParameterPlaceholders(args, formatParamsMap);
others = ParameterUtils.convertParameterPlaceholders(others, formatParamsMap);
}
sparkParameters.setMainArgs(args);
sparkParameters.setOthers(others);
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Eights-Li commented on issue #4050: [Feature][SparkTask] SparkTask others param String need support variable inject
Posted by GitBox <gi...@apache.org>.
Eights-Li commented on issue #4050:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4050#issuecomment-728743973
fixed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] dailidong commented on issue #4050: [Feature][SparkTask] SparkTask others param String need support variable inject
Posted by GitBox <gi...@apache.org>.
dailidong commented on issue #4050:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4050#issuecomment-725274558
if anybody want to implement this feature, please leave a message, thx
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Eights-Li commented on issue #4050: [Feature][SparkTask] SparkTask others param String need support variable inject
Posted by GitBox <gi...@apache.org>.
Eights-Li commented on issue #4050:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4050#issuecomment-725876481
i will do this job
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-dolphinscheduler] Eights-Li closed issue #4050: [Feature][SparkTask] SparkTask others param String need support variable inject
Posted by GitBox <gi...@apache.org>.
Eights-Li closed issue #4050:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4050
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org