Browse Source

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
pull/3/MERGE
dailidong 5 years ago committed by gaojun2048
parent
commit
8e8ffa93c9
  1. 15
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/monitor/RunConfig.java

15
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/monitor/RunConfig.java

@ -16,6 +16,8 @@
*/ */
package org.apache.dolphinscheduler.server.monitor; 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.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -52,7 +54,18 @@ public class RunConfig {
} }
public String getWorkers() { 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) { public void setWorkers(String workers) {

Loading…
Cancel
Save