提交 8e8ffa93 编写于 作者: D dailidong 提交者: gaojun2048

fix getWorkers bug on RunConfig (#2747)

* fix worker group config no effect

* remove codehaus janino jar
the license about janino maybe not compatiable with Apache v2

* Merge remote-tracking branch 'upstream/dev-1.3.0' into dev-1.3.0

# Conflicts:
#	dolphinscheduler-server/src/main/resources/config/install_config.conf

* datasource config

* Update datasource.properties

* fix RunConfig bug
上级 48d12f28
......@@ -16,6 +16,8 @@
*/
package org.apache.dolphinscheduler.server.monitor;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
......@@ -52,7 +54,18 @@ public class RunConfig {
}
public String getWorkers() {
return workers;
StringBuilder sb = new StringBuilder(50);
if(StringUtils.isNotBlank(workers)){
String[] workersArr = workers.trim().split(Constants.COMMA);
for (String workerGroup : workersArr) {
sb.append(workerGroup.split(Constants.COLON)[0]).append(Constants.COMMA);
}
}
if( sb.length() > 0) {
sb.deleteCharAt(sb.length() - 1);
}
return sb.toString();
}
public void setWorkers(String workers) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册