Browse Source

Optimize server startup log (#15362)

augit-log
Wenjun Ruan 5 months ago committed by GitHub
parent
commit
d6dea4633c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/rpc/AlertRpcServer.java
  2. 4
      dolphinscheduler-api/src/main/resources/logback-spring.xml
  3. 2
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/LoggerServiceTest.java
  4. 114
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/constants/Constants.java
  5. 16
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/NetUtils.java
  6. 4
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
  7. 25
      dolphinscheduler-extract/dolphinscheduler-extract-base/src/main/java/org/apache/dolphinscheduler/extract/base/NettyRemotingServer.java
  8. 13
      dolphinscheduler-extract/dolphinscheduler-extract-base/src/main/java/org/apache/dolphinscheduler/extract/base/config/NettyServerConfig.java
  9. 3
      dolphinscheduler-extract/dolphinscheduler-extract-base/src/test/java/org/apache/dolphinscheduler/extract/base/client/SingletonJdkDynamicRpcClientProxyFactoryTest.java
  10. 4
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/builder/TaskExecutionContextBuilder.java
  11. 40
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
  12. 3
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/MasterRpcServer.java
  13. 8
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
  14. 4
      dolphinscheduler-master/src/main/resources/logback-spring.xml
  15. 3
      dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/rpc/RpcBenchMarkTest.java
  16. 4
      dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml
  17. 72
      dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java
  18. 34
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java
  19. 2
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/message/MessageRetryRunner.java
  20. 3
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/rpc/WorkerRpcServer.java
  21. 4
      dolphinscheduler-worker/src/main/resources/logback-spring.xml

5
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/rpc/AlertRpcServer.java

@ -18,7 +18,7 @@
package org.apache.dolphinscheduler.alert.rpc; package org.apache.dolphinscheduler.alert.rpc;
import org.apache.dolphinscheduler.alert.config.AlertConfig; import org.apache.dolphinscheduler.alert.config.AlertConfig;
import org.apache.dolphinscheduler.extract.base.NettyRemotingServer; import org.apache.dolphinscheduler.extract.base.NettyRemotingServerFactory;
import org.apache.dolphinscheduler.extract.base.config.NettyServerConfig; import org.apache.dolphinscheduler.extract.base.config.NettyServerConfig;
import org.apache.dolphinscheduler.extract.base.server.SpringServerMethodInvokerDiscovery; import org.apache.dolphinscheduler.extract.base.server.SpringServerMethodInvokerDiscovery;
@ -31,7 +31,8 @@ import org.springframework.stereotype.Service;
public class AlertRpcServer extends SpringServerMethodInvokerDiscovery implements AutoCloseable { public class AlertRpcServer extends SpringServerMethodInvokerDiscovery implements AutoCloseable {
public AlertRpcServer(AlertConfig alertConfig) { public AlertRpcServer(AlertConfig alertConfig) {
super(new NettyRemotingServer(new NettyServerConfig(alertConfig.getPort()))); super(NettyRemotingServerFactory.buildNettyRemotingServer(
NettyServerConfig.builder().serverName("AlertRpcServer").listenPort(alertConfig.getPort()).build()));
} }
public void start() { public void start() {

4
dolphinscheduler-api/src/main/resources/logback-spring.xml

@ -23,7 +23,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern> <pattern>
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
@ -40,7 +40,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern> <pattern>
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>

2
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/LoggerServiceTest.java

@ -91,7 +91,7 @@ public class LoggerServiceTest {
@BeforeEach @BeforeEach
public void setUp() { public void setUp() {
nettyRemotingServer = new NettyRemotingServer(new NettyServerConfig(8080)); nettyRemotingServer = new NettyRemotingServer(NettyServerConfig.builder().listenPort(8080).build());
nettyRemotingServer.start(); nettyRemotingServer.start();
SpringServerMethodInvokerDiscovery springServerMethodInvokerDiscovery = SpringServerMethodInvokerDiscovery springServerMethodInvokerDiscovery =
new SpringServerMethodInvokerDiscovery(nettyRemotingServer); new SpringServerMethodInvokerDiscovery(nettyRemotingServer);

114
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/constants/Constants.java

@ -35,9 +35,6 @@ public final class Constants {
*/ */
public static final String COMMON_PROPERTIES_PATH = "/common.properties"; public static final String COMMON_PROPERTIES_PATH = "/common.properties";
public static final String REGISTRY_DOLPHINSCHEDULER_MASTERS = "/nodes/master";
public static final String REGISTRY_DOLPHINSCHEDULER_WORKERS = "/nodes/worker";
public static final String FORMAT_SS = "%s%s"; public static final String FORMAT_SS = "%s%s";
public static final String FORMAT_S_S = "%s/%s"; public static final String FORMAT_S_S = "%s/%s";
public static final String FORMAT_S_S_COLON = "%s:%s"; public static final String FORMAT_S_S_COLON = "%s:%s";
@ -191,11 +188,6 @@ public final class Constants {
*/ */
public static final String DOUBLE_SLASH = "//"; public static final String DOUBLE_SLASH = "//";
/**
* EQUAL SIGN
*/
public static final String EQUAL_SIGN = "=";
/** /**
* AT SIGN * AT SIGN
*/ */
@ -235,11 +227,6 @@ public final class Constants {
*/ */
public static final int SOCKET_TIMEOUT = 60 * 1000; public static final int SOCKET_TIMEOUT = 60 * 1000;
/**
* registry session timeout
*/
public static final int REGISTRY_SESSION_TIMEOUT = 10 * 1000;
/** /**
* http header * http header
*/ */
@ -300,22 +287,6 @@ public final class Constants {
*/ */
public static final int MAX_TASK_TIMEOUT = 24 * 3600; public static final int MAX_TASK_TIMEOUT = 24 * 3600;
/**
* worker host weight
*/
public static final int DEFAULT_WORKER_HOST_WEIGHT = 100;
/**
* unit convertor for minute to second
*/
public static final int MINUTE_2_SECOND_TIME_UNIT = 60;
/***
*
* rpc port
*/
public static final String RPC_PORT = "rpc.port";
/** /**
* forbid running task * forbid running task
*/ */
@ -356,21 +327,6 @@ public final class Constants {
public static final Duration SERVER_CLOSE_WAIT_TIME = Duration.ofSeconds(3); public static final Duration SERVER_CLOSE_WAIT_TIME = Duration.ofSeconds(3);
/**
* one second mils
*/
public static final long SECOND_TIME_MILLIS = 1_000L;
/**
* master task instance cache-database refresh interval
*/
public static final long CACHE_REFRESH_TIME_MILLIS = 20 * 1_000L;
/**
* heartbeat for zk info length
*/
public static final int HEARTBEAT_FOR_ZOOKEEPER_INFO_LENGTH = 14;
/** /**
* jar * jar
*/ */
@ -408,39 +364,10 @@ public final class Constants {
*/ */
public static final int VERSION_FIRST = 1; public static final int VERSION_FIRST = 1;
/**
* ACCEPTED
*/
public static final String ACCEPTED = "ACCEPTED";
/**
* SUCCEEDED
*/
public static final String SUCCEEDED = "SUCCEEDED";
/**
* ENDED
*/
public static final String ENDED = "ENDED";
/**
* NEW
*/
public static final String NEW = "NEW";
/**
* NEW_SAVING
*/
public static final String NEW_SAVING = "NEW_SAVING";
/**
* SUBMITTED
*/
public static final String SUBMITTED = "SUBMITTED";
/** /**
* FAILED * FAILED
*/ */
public static final String FAILED = "FAILED"; public static final String FAILED = "FAILED";
/**
* KILLED
*/
public static final String KILLED = "KILLED";
/** /**
* RUNNING * RUNNING
*/ */
@ -449,25 +376,11 @@ public final class Constants {
* underline "_" * underline "_"
*/ */
public static final String UNDERLINE = "_"; public static final String UNDERLINE = "_";
/**
* application regex
*/
public static final String APPLICATION_REGEX = "application_\\d+_\\d+";
public static final String PID = SystemUtils.IS_OS_WINDOWS ? "handle" : "pid"; public static final String PID = SystemUtils.IS_OS_WINDOWS ? "handle" : "pid";
public static final char SUBTRACT_CHAR = '-';
public static final char ADD_CHAR = '+';
public static final char MULTIPLY_CHAR = '*';
public static final char DIVISION_CHAR = '/';
public static final char LEFT_BRACE_CHAR = '(';
public static final char RIGHT_BRACE_CHAR = ')';
public static final String ADD_STRING = "+";
public static final String STAR = "*"; public static final String STAR = "*";
public static final String DIVISION_STRING = "/";
public static final String LEFT_BRACE_STRING = "(";
public static final char P = 'P';
public static final char N = 'N'; public static final char N = 'N';
public static final String SUBTRACT_STRING = "-";
public static final String GLOBAL_PARAMS = "globalParams"; public static final String GLOBAL_PARAMS = "globalParams";
public static final String LOCAL_PARAMS = "localParams"; public static final String LOCAL_PARAMS = "localParams";
public static final String SUBPROCESS_INSTANCE_ID = "subProcessInstanceId"; public static final String SUBPROCESS_INSTANCE_ID = "subProcessInstanceId";
@ -482,9 +395,6 @@ public final class Constants {
public static final String QUEUE_NAME = "queueName"; public static final String QUEUE_NAME = "queueName";
public static final int LOG_QUERY_SKIP_LINE_NUMBER = 0; public static final int LOG_QUERY_SKIP_LINE_NUMBER = 0;
public static final int LOG_QUERY_LIMIT = 4096; public static final int LOG_QUERY_LIMIT = 4096;
public static final String BLOCKING_CONDITION = "blockingCondition";
public static final String ALERT_WHEN_BLOCKING = "alertWhenBlocking";
public static final String ALIAS = "alias"; public static final String ALIAS = "alias";
public static final String CONTENT = "content"; public static final String CONTENT = "content";
public static final String DEPENDENT_SPLIT = ":||"; public static final String DEPENDENT_SPLIT = ":||";
@ -527,11 +437,6 @@ public final class Constants {
public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE =
"hadoop.security.authentication.startup.state"; "hadoop.security.authentication.startup.state";
/**
* com.amazonaws.services.s3.enableV4
*/
public static final String AWS_S3_V4 = "com.amazonaws.services.s3.enableV4";
/** /**
* loginUserFromKeytab user * loginUserFromKeytab user
*/ */
@ -550,11 +455,6 @@ public final class Constants {
public static final String WORKFLOW_INSTANCE_ID_MDC_KEY = "workflowInstanceId"; public static final String WORKFLOW_INSTANCE_ID_MDC_KEY = "workflowInstanceId";
public static final String TASK_INSTANCE_ID_MDC_KEY = "taskInstanceId"; public static final String TASK_INSTANCE_ID_MDC_KEY = "taskInstanceId";
/**
* task log info format
*/
public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s";
/** /**
* double brackets left * double brackets left
*/ */
@ -647,10 +547,6 @@ public final class Constants {
* authorize writable perm * authorize writable perm
*/ */
public static final int AUTHORIZE_WRITABLE_PERM = 7; public static final int AUTHORIZE_WRITABLE_PERM = 7;
/**
* authorize readable perm
*/
public static final int AUTHORIZE_READABLE_PERM = 4;
public static final String START_TIME = "start time"; public static final String START_TIME = "start time";
public static final String END_TIME = "end time"; public static final String END_TIME = "end time";
@ -682,8 +578,6 @@ public final class Constants {
*/ */
public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path"; public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path";
public static final String CACHE_KEY_VALUE_ALL = "'all'";
/** /**
* use for k8s * use for k8s
*/ */
@ -784,12 +678,6 @@ public final class Constants {
*/ */
public static final String SUPPORT_HIVE_ONE_SESSION = "support.hive.oneSession"; public static final String SUPPORT_HIVE_ONE_SESSION = "support.hive.oneSession";
public static final String PRINCIPAL = "principal";
public static final String ORACLE_DB_CONNECT_TYPE = "connectType";
public static final String KERBEROS_KRB5_CONF_PATH = "javaSecurityKrb5Conf";
public static final String KERBEROS_KEY_TAB_USERNAME = "loginUserKeytabUsername";
public static final String KERBEROS_KEY_TAB_PATH = "loginUserKeytabPath";
public static final Integer QUERY_ALL_ON_SYSTEM = 0; public static final Integer QUERY_ALL_ON_SYSTEM = 0;
public static final Integer QUERY_ALL_ON_PROJECT = 1; public static final Integer QUERY_ALL_ON_PROJECT = 1;
public static final Integer QUERY_ALL_ON_WORKFLOW = 2; public static final Integer QUERY_ALL_ON_WORKFLOW = 2;

16
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/NetUtils.java

@ -41,9 +41,6 @@ import lombok.extern.slf4j.Slf4j;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
/**
* NetUtils
*/
@Slf4j @Slf4j
public class NetUtils { public class NetUtils {
@ -213,15 +210,17 @@ public class NetUtils {
.collect(Collectors.toList()); .collect(Collectors.toList());
// Use the specified network interface if set // Use the specified network interface if set
if (StringUtils.isNotBlank(specifyNetworkInterfaceName())) { String specifiedNetworkInterfaceName = specifyNetworkInterfaceName();
String specifyNetworkInterfaceName = specifyNetworkInterfaceName(); if (StringUtils.isNotBlank(specifiedNetworkInterfaceName)) {
validNetworkInterfaces = validNetworkInterfaces.stream() validNetworkInterfaces = validNetworkInterfaces.stream()
.filter(networkInterface -> specifyNetworkInterfaceName.equals(networkInterface.getDisplayName())) .filter(networkInterface -> specifiedNetworkInterfaceName.equals(networkInterface.getDisplayName()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtils.isEmpty(validNetworkInterfaces)) { if (CollectionUtils.isEmpty(validNetworkInterfaces)) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"The specified network interface: " + specifyNetworkInterfaceName + " is not found"); "The specified network interface: " + specifiedNetworkInterfaceName + " is not found");
} }
log.info("Use the specified network interface: {} -> {}", specifiedNetworkInterfaceName,
validNetworkInterfaces);
} }
Set<String> restrictNetworkInterfaceName = restrictNetworkInterfaceName(); Set<String> restrictNetworkInterfaceName = restrictNetworkInterfaceName();
@ -307,9 +306,10 @@ public class NetUtils {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) { while (interfaces.hasMoreElements()) {
NetworkInterface networkInterface = interfaces.nextElement(); NetworkInterface networkInterface = interfaces.nextElement();
log.info("Found NetworkInterface: {}", networkInterface); log.debug("Found NetworkInterface: {}", networkInterface);
validNetworkInterfaces.add(networkInterface); validNetworkInterfaces.add(networkInterface);
} }
log.info("Get all NetworkInterfaces: {}", validNetworkInterfaces);
return validNetworkInterfaces; return validNetworkInterfaces;
} }

4
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java

@ -17,7 +17,6 @@
package org.apache.dolphinscheduler.dao.entity; package org.apache.dolphinscheduler.dao.entity;
import static org.apache.dolphinscheduler.common.constants.Constants.MINUTE_2_SECOND_TIME_UNIT;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_CONDITIONS; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_CONDITIONS;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DEPENDENT; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DEPENDENT;
@ -38,6 +37,7 @@ import org.apache.dolphinscheduler.plugin.task.api.parameters.SwitchParameters;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
import lombok.Data; import lombok.Data;
@ -407,7 +407,7 @@ public class TaskInstance implements Serializable {
Date now = new Date(); Date now = new Date();
long failedTimeInterval = DateUtils.differSec(now, getEndTime()); long failedTimeInterval = DateUtils.differSec(now, getEndTime());
// task retry does not over time, return false // task retry does not over time, return false
return getRetryInterval() * MINUTE_2_SECOND_TIME_UNIT < failedTimeInterval; return TimeUnit.MINUTES.toSeconds(getRetryInterval()) < failedTimeInterval;
} }
} }

25
dolphinscheduler-extract/dolphinscheduler-extract-base/src/main/java/org/apache/dolphinscheduler/extract/base/NettyRemotingServer.java

@ -73,9 +73,11 @@ public class NettyRemotingServer {
public NettyRemotingServer(final NettyServerConfig serverConfig) { public NettyRemotingServer(final NettyServerConfig serverConfig) {
this.serverConfig = serverConfig; this.serverConfig = serverConfig;
ThreadFactory bossThreadFactory = ThreadFactory bossThreadFactory =
new ThreadFactoryBuilder().setDaemon(true).setNameFormat("NettyServerBossThread_%s").build(); new ThreadFactoryBuilder().setDaemon(true).setNameFormat(serverConfig.getServerName() + "BossThread_%s")
.build();
ThreadFactory workerThreadFactory = ThreadFactory workerThreadFactory =
new ThreadFactoryBuilder().setDaemon(true).setNameFormat("NettyServerWorkerThread_%s").build(); new ThreadFactoryBuilder().setDaemon(true)
.setNameFormat(serverConfig.getServerName() + "WorkerThread_%s").build();
if (Epoll.isAvailable()) { if (Epoll.isAvailable()) {
this.bossGroup = new EpollEventLoopGroup(1, bossThreadFactory); this.bossGroup = new EpollEventLoopGroup(1, bossThreadFactory);
this.workGroup = new EpollEventLoopGroup(serverConfig.getWorkerThread(), workerThreadFactory); this.workGroup = new EpollEventLoopGroup(serverConfig.getWorkerThread(), workerThreadFactory);
@ -108,16 +110,23 @@ public class NettyRemotingServer {
try { try {
future = serverBootstrap.bind(serverConfig.getListenPort()).sync(); future = serverBootstrap.bind(serverConfig.getListenPort()).sync();
} catch (Exception e) { } catch (Exception e) {
log.error("NettyRemotingServer bind fail {}, exit", e.getMessage(), e); log.error("{} bind fail {}, exit", serverConfig.getServerName(), e.getMessage(), e);
throw new RemoteException(String.format(NETTY_BIND_FAILURE_MSG, serverConfig.getListenPort())); throw new RemoteException(
String.format("%s bind %s fail", serverConfig.getServerName(), serverConfig.getListenPort()));
} }
if (future.isSuccess()) { if (future.isSuccess()) {
log.info("NettyRemotingServer bind success at port : {}", serverConfig.getListenPort()); log.info("{} bind success at port: {}", serverConfig.getServerName(), serverConfig.getListenPort());
} else if (future.cause() != null) { return;
throw new RemoteException(String.format(NETTY_BIND_FAILURE_MSG, serverConfig.getListenPort()), }
if (future.cause() != null) {
throw new RemoteException(
String.format("%s bind %s fail", serverConfig.getServerName(), serverConfig.getListenPort()),
future.cause()); future.cause());
} else { } else {
throw new RemoteException(String.format(NETTY_BIND_FAILURE_MSG, serverConfig.getListenPort())); throw new RemoteException(
String.format("%s bind %s fail", serverConfig.getServerName(), serverConfig.getListenPort()));
} }
} }
} }

13
dolphinscheduler-extract/dolphinscheduler-extract-base/src/main/java/org/apache/dolphinscheduler/extract/base/config/NettyServerConfig.java

@ -17,11 +17,19 @@
package org.apache.dolphinscheduler.extract.base.config; package org.apache.dolphinscheduler.extract.base.config;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
@Data @Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class NettyServerConfig { public class NettyServerConfig {
private String serverName;
/** /**
* init the server connectable queue * init the server connectable queue
*/ */
@ -55,9 +63,6 @@ public class NettyServerConfig {
/** /**
* listen port * listen port
*/ */
private int listenPort = 12346; private int listenPort;
public NettyServerConfig(int listenPort) {
this.listenPort = listenPort;
}
} }

3
dolphinscheduler-extract/dolphinscheduler-extract-base/src/test/java/org/apache/dolphinscheduler/extract/base/client/SingletonJdkDynamicRpcClientProxyFactoryTest.java

@ -34,7 +34,8 @@ public class SingletonJdkDynamicRpcClientProxyFactoryTest {
@BeforeEach @BeforeEach
public void setUp() { public void setUp() {
nettyRemotingServer = new NettyRemotingServer(new NettyServerConfig(12345)); nettyRemotingServer =
new NettyRemotingServer(NettyServerConfig.builder().serverName("ApiServer").listenPort(12345).build());
nettyRemotingServer.start(); nettyRemotingServer.start();
new SpringServerMethodInvokerDiscovery(nettyRemotingServer) new SpringServerMethodInvokerDiscovery(nettyRemotingServer)

4
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/builder/TaskExecutionContextBuilder.java

@ -18,7 +18,6 @@
package org.apache.dolphinscheduler.server.master.builder; package org.apache.dolphinscheduler.server.master.builder;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static org.apache.dolphinscheduler.common.constants.Constants.MINUTE_2_SECOND_TIME_UNIT;
import org.apache.dolphinscheduler.common.enums.TimeoutFlag; import org.apache.dolphinscheduler.common.enums.TimeoutFlag;
import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.DateUtils;
@ -34,6 +33,7 @@ import org.apache.dolphinscheduler.plugin.task.api.model.Property;
import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper; import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.ResourceParametersHelper;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -84,7 +84,7 @@ public class TaskExecutionContextBuilder {
if (taskDefinition.getTimeoutNotifyStrategy() == TaskTimeoutStrategy.FAILED if (taskDefinition.getTimeoutNotifyStrategy() == TaskTimeoutStrategy.FAILED
|| taskDefinition.getTimeoutNotifyStrategy() == TaskTimeoutStrategy.WARNFAILED) { || taskDefinition.getTimeoutNotifyStrategy() == TaskTimeoutStrategy.WARNFAILED) {
taskExecutionContext.setTaskTimeout( taskExecutionContext.setTaskTimeout(
Math.min(taskDefinition.getTimeout() * MINUTE_2_SECOND_TIME_UNIT, Integer.MAX_VALUE)); (int) Math.min(TimeUnit.MINUTES.toSeconds(taskDefinition.getTimeout()), Integer.MAX_VALUE));
} }
} }
taskExecutionContext.setTaskParams(taskDefinition.getTaskParams()); taskExecutionContext.setTaskParams(taskDefinition.getTaskParams());

40
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java

@ -163,23 +163,27 @@ public class MasterConfig implements Validator {
} }
private void printConfig() { private void printConfig() {
log.info("Master config: listenPort -> {} ", listenPort); String config =
log.info("Master config: fetchCommandNum -> {} ", fetchCommandNum); "\n****************************Master Configuration**************************************" +
log.info("Master config: preExecThreads -> {} ", preExecThreads); "\n listen-port -> " + listenPort +
log.info("Master config: execThreads -> {} ", execThreads); "\n fetch-command-num -> " + fetchCommandNum +
log.info("Master config: dispatchTaskNumber -> {} ", dispatchTaskNumber); "\n pre-exec-threads -> " + preExecThreads +
log.info("Master config: hostSelector -> {} ", hostSelector); "\n exec-threads -> " + execThreads +
log.info("Master config: heartbeatInterval -> {} ", heartbeatInterval); "\n dispatch-task-number -> " + dispatchTaskNumber +
log.info("Master config: taskCommitRetryTimes -> {} ", taskCommitRetryTimes); "\n host-selector -> " + hostSelector +
log.info("Master config: taskCommitInterval -> {} ", taskCommitInterval); "\n heartbeat-interval -> " + heartbeatInterval +
log.info("Master config: stateWheelInterval -> {} ", stateWheelInterval); "\n task-commit-retry-times -> " + taskCommitRetryTimes +
log.info("Master config: maxCpuLoadAvg -> {} ", maxCpuLoadAvg); "\n task-commit-interval -> " + taskCommitInterval +
log.info("Master config: reservedMemory -> {} ", reservedMemory); "\n state-wheel-interval -> " + stateWheelInterval +
log.info("Master config: failoverInterval -> {} ", failoverInterval); "\n max-cpu-load-avg -> " + maxCpuLoadAvg +
log.info("Master config: killApplicationWhenTaskFailover -> {} ", killApplicationWhenTaskFailover); "\n reserved-memory -> " + reservedMemory +
log.info("Master config: registryDisconnectStrategy -> {} ", registryDisconnectStrategy); "\n failover-interval -> " + failoverInterval +
log.info("Master config: masterAddress -> {} ", masterAddress); "\n kill-application-when-task-failover -> " + killApplicationWhenTaskFailover +
log.info("Master config: masterRegistryPath -> {} ", masterRegistryPath); "\n registry-disconnect-strategy -> " + registryDisconnectStrategy +
log.info("Master config: workerGroupRefreshInterval -> {} ", workerGroupRefreshInterval); "\n master-address -> " + masterAddress +
"\n master-registry-path: " + masterRegistryPath +
"\n worker-group-refresh-interval: " + workerGroupRefreshInterval +
"\n****************************Master Configuration**************************************";
log.info(config);
} }
} }

3
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/MasterRpcServer.java

@ -31,7 +31,8 @@ import org.springframework.stereotype.Component;
public class MasterRpcServer extends SpringServerMethodInvokerDiscovery implements AutoCloseable { public class MasterRpcServer extends SpringServerMethodInvokerDiscovery implements AutoCloseable {
public MasterRpcServer(MasterConfig masterConfig) { public MasterRpcServer(MasterConfig masterConfig) {
super(NettyRemotingServerFactory.buildNettyRemotingServer(new NettyServerConfig(masterConfig.getListenPort()))); super(NettyRemotingServerFactory.buildNettyRemotingServer(NettyServerConfig.builder()
.serverName("MasterRpcServer").listenPort(masterConfig.getListenPort()).build()));
} }
public void start() { public void start() {

8
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java

@ -17,7 +17,6 @@
package org.apache.dolphinscheduler.server.master.runner; package org.apache.dolphinscheduler.server.master.runner;
import org.apache.dolphinscheduler.common.constants.Constants;
import org.apache.dolphinscheduler.common.enums.StateEventType; import org.apache.dolphinscheduler.common.enums.StateEventType;
import org.apache.dolphinscheduler.common.enums.TimeoutFlag; import org.apache.dolphinscheduler.common.enums.TimeoutFlag;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus; import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
@ -37,6 +36,7 @@ import org.apache.dolphinscheduler.server.master.runner.task.TaskInstanceKey;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
@ -147,8 +147,7 @@ public class StateWheelExecuteThread extends BaseDaemonThread {
continue; continue;
} }
long timeRemain = DateUtils.getRemainTime(processInstance.getStartTime(), long timeRemain = DateUtils.getRemainTime(processInstance.getStartTime(),
(long) processInstance.getTimeout() TimeUnit.MINUTES.toSeconds(processInstance.getTimeout()));
* Constants.MINUTE_2_SECOND_TIME_UNIT);
if (timeRemain < 0) { if (timeRemain < 0) {
log.info("Workflow instance {} timeout, adding timeout event", processInstance.getId()); log.info("Workflow instance {} timeout, adding timeout event", processInstance.getId());
addProcessTimeoutEvent(processInstance); addProcessTimeoutEvent(processInstance);
@ -247,8 +246,7 @@ public class StateWheelExecuteThread extends BaseDaemonThread {
TaskInstance taskInstance = taskInstanceOptional.get(); TaskInstance taskInstance = taskInstanceOptional.get();
if (TimeoutFlag.OPEN == taskInstance.getTaskDefine().getTimeoutFlag()) { if (TimeoutFlag.OPEN == taskInstance.getTaskDefine().getTimeoutFlag()) {
long timeRemain = DateUtils.getRemainTime(taskInstance.getStartTime(), long timeRemain = DateUtils.getRemainTime(taskInstance.getStartTime(),
(long) taskInstance.getTaskDefine().getTimeout() TimeUnit.MINUTES.toSeconds(taskInstance.getTaskDefine().getTimeout()));
* Constants.MINUTE_2_SECOND_TIME_UNIT);
if (timeRemain < 0) { if (timeRemain < 0) {
log.info("Task instance is timeout, adding task timeout event and remove the check"); log.info("Task instance is timeout, adding task timeout event and remove the check");
addTaskTimeoutEvent(taskInstance); addTaskTimeoutEvent(taskInstance);

4
dolphinscheduler-master/src/main/resources/logback-spring.xml

@ -23,7 +23,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern> <pattern>
[WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
@ -61,7 +61,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern> <pattern>
[WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>

3
dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/rpc/RpcBenchMarkTest.java

@ -52,7 +52,8 @@ public class RpcBenchMarkTest extends AbstractBaseBenchmark {
@Setup @Setup
public void before() { public void before() {
nettyRemotingServer = new NettyRemotingServer(new NettyServerConfig(12345)); nettyRemotingServer = new NettyRemotingServer(
NettyServerConfig.builder().serverName("NettyRemotingServer").listenPort(12345).build());
nettyRemotingServer.start(); nettyRemotingServer.start();
SpringServerMethodInvokerDiscovery springServerMethodInvokerDiscovery = SpringServerMethodInvokerDiscovery springServerMethodInvokerDiscovery =
new SpringServerMethodInvokerDiscovery(nettyRemotingServer); new SpringServerMethodInvokerDiscovery(nettyRemotingServer);

4
dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml

@ -23,7 +23,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern> <pattern>
[WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
@ -38,7 +38,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern> <pattern>
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>

72
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java

@ -21,7 +21,6 @@ import org.apache.dolphinscheduler.common.constants.DateConstants;
import java.time.Duration; import java.time.Duration;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@ -35,11 +34,6 @@ public class TaskConstants {
public static final String FLINK_APPLICATION_REGEX = "JobID \\w+"; public static final String FLINK_APPLICATION_REGEX = "JobID \\w+";
/**
* string false
*/
public static final String STRING_FALSE = "false";
/** /**
* exit code kill * exit code kill
*/ */
@ -146,11 +140,6 @@ public class TaskConstants {
public static final String RWXR_XR_X = "rwxr-xr-x"; public static final String RWXR_XR_X = "rwxr-xr-x";
/**
* date format of yyyyMMdd
*/
public static final String PARAMETER_FORMAT_DATE = "yyyyMMdd";
/** /**
* date format of yyyyMMddHHmmss * date format of yyyyMMddHHmmss
*/ */
@ -291,22 +280,9 @@ public class TaskConstants {
public static final char P = 'P'; public static final char P = 'P';
public static final char N = 'N'; public static final char N = 'N';
public static final String SUBTRACT_STRING = "-"; public static final String SUBTRACT_STRING = "-";
public static final String GLOBAL_PARAMS = "globalParams";
public static final String LOCAL_PARAMS = "localParams";
public static final String LOCAL_PARAMS_LIST = "localParamsList"; public static final String LOCAL_PARAMS_LIST = "localParamsList";
public static final String SUBPROCESS_INSTANCE_ID = "subProcessInstanceId";
public static final String PROCESS_INSTANCE_STATE = "processInstanceState";
public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance";
public static final String CONDITION_RESULT = "conditionResult";
public static final String SWITCH_RESULT = "switchResult";
public static final String DEPENDENCE = "dependence";
public static final String TASK_TYPE = "taskType"; public static final String TASK_TYPE = "taskType";
public static final String TASK_LIST = "taskList";
public static final String QUEUE = "queue"; public static final String QUEUE = "queue";
public static final String QUEUE_NAME = "queueName";
public static final int LOG_QUERY_SKIP_LINE_NUMBER = 0;
public static final int LOG_QUERY_LIMIT = 4096;
/** /**
* default display rows * default display rows
*/ */
@ -327,33 +303,6 @@ public class TaskConstants {
*/ */
public static final String D = "-D"; public static final String D = "-D";
/**
* jdbc url
*/
public static final String JDBC_MYSQL = "jdbc:mysql://";
public static final String JDBC_POSTGRESQL = "jdbc:postgresql://";
public static final String JDBC_HIVE_2 = "jdbc:hive2://";
public static final String JDBC_CLICKHOUSE = "jdbc:clickhouse://";
public static final String JDBC_DATABEND = "jdbc:databend://";
public static final String JDBC_ORACLE_SID = "jdbc:oracle:thin:@";
public static final String JDBC_ORACLE_SERVICE_NAME = "jdbc:oracle:thin:@//";
public static final String JDBC_SQLSERVER = "jdbc:sqlserver://";
public static final String JDBC_DB2 = "jdbc:db2://";
public static final String JDBC_PRESTO = "jdbc:presto://";
/**
* driver
*/
public static final String ORG_POSTGRESQL_DRIVER = "org.postgresql.Driver";
public static final String COM_MYSQL_CJ_JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
public static final String ORG_APACHE_HIVE_JDBC_HIVE_DRIVER = "org.apache.hive.jdbc.HiveDriver";
public static final String COM_CLICKHOUSE_JDBC_DRIVER = "com.clickhouse.jdbc.ClickHouseDriver";
public static final String COM_DATABEND_JDBC_DRIVER = "com.databend.jdbc.DatabendDriver";
public static final String COM_ORACLE_JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
public static final String COM_SQLSERVER_JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
public static final String COM_DB2_JDBC_DRIVER = "com.ibm.db2.jcc.DB2Driver";
public static final String COM_PRESTO_JDBC_DRIVER = "com.facebook.presto.jdbc.PrestoDriver";
/** /**
* datasource encryption salt * datasource encryption salt
*/ */
@ -361,11 +310,6 @@ public class TaskConstants {
public static final String DATASOURCE_ENCRYPTION_ENABLE = "datasource.encryption.enable"; public static final String DATASOURCE_ENCRYPTION_ENABLE = "datasource.encryption.enable";
public static final String DATASOURCE_ENCRYPTION_SALT = "datasource.encryption.salt"; public static final String DATASOURCE_ENCRYPTION_SALT = "datasource.encryption.salt";
/**
* resource storage type
*/
// public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type";
/** /**
* kerberos * kerberos
*/ */
@ -407,11 +351,6 @@ public class TaskConstants {
public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE =
"hadoop.security.authentication.startup.state"; "hadoop.security.authentication.startup.state";
/**
* Task Logger Thread's name
*/
public static final String TASK_LOGGER_THREAD_NAME = "TaskLogInfo";
/** /**
* hdfs/s3 configuration * hdfs/s3 configuration
* resource.storage.upload.base.path * resource.storage.upload.base.path
@ -423,11 +362,6 @@ public class TaskConstants {
*/ */
public static final String DATA_QUALITY_JAR_NAME = "data-quality.jar.name"; public static final String DATA_QUALITY_JAR_NAME = "data-quality.jar.name";
/**
* data.quality.error.output.path
*/
public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path";
public static final String TASK_TYPE_CONDITIONS = "CONDITIONS"; public static final String TASK_TYPE_CONDITIONS = "CONDITIONS";
public static final String TASK_TYPE_SWITCH = "SWITCH"; public static final String TASK_TYPE_SWITCH = "SWITCH";
@ -442,14 +376,10 @@ public class TaskConstants {
public static final String TASK_TYPE_DATA_QUALITY = "DATA_QUALITY"; public static final String TASK_TYPE_DATA_QUALITY = "DATA_QUALITY";
public static final String DEPLOY_MODE_KUBERNETES = "Kubernetes";
public static final Set<String> TASK_TYPE_SET_K8S = Sets.newHashSet("K8S", "KUBEFLOW"); public static final Set<String> TASK_TYPE_SET_K8S = Sets.newHashSet("K8S", "KUBEFLOW");
public static final String TASK_TYPE_BLOCKING = "BLOCKING"; public static final String TASK_TYPE_BLOCKING = "BLOCKING";
public static final String TASK_TYPE_STREAM = "STREAM";
/** /**
* azure config * azure config
*/ */
@ -483,7 +413,6 @@ public class TaskConstants {
* use for k8s task * use for k8s task
*/ */
public static final String API_VERSION = "batch/v1"; public static final String API_VERSION = "batch/v1";
public static final String IMAGE_PULL_POLICY = "Always";
public static final String RESTART_POLICY = "Never"; public static final String RESTART_POLICY = "Never";
public static final String MEMORY = "memory"; public static final String MEMORY = "memory";
public static final String CPU = "cpu"; public static final String CPU = "cpu";
@ -496,7 +425,6 @@ public class TaskConstants {
public static final int LOG_LINES = 500; public static final int LOG_LINES = 500;
public static final String NAMESPACE_NAME = "name"; public static final String NAMESPACE_NAME = "name";
public static final String CLUSTER = "cluster"; public static final String CLUSTER = "cluster";
public static final Pattern COMMAND_SPLIT_REGEX = Pattern.compile("[^\\s\"'`]+|\"([^\"]+)\"|'([^']+)'|`([^`]+)`");
/** /**
* spark / flink on k8s label name * spark / flink on k8s label name

34
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/config/WorkerConfig.java

@ -17,10 +17,9 @@
package org.apache.dolphinscheduler.server.worker.config; package org.apache.dolphinscheduler.server.worker.config;
import static org.apache.dolphinscheduler.common.constants.Constants.REGISTRY_DOLPHINSCHEDULER_WORKERS;
import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.common.utils.NetUtils;
import org.apache.dolphinscheduler.registry.api.ConnectStrategyProperties; import org.apache.dolphinscheduler.registry.api.ConnectStrategyProperties;
import org.apache.dolphinscheduler.registry.api.enums.RegistryNodeType;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -81,22 +80,27 @@ public class WorkerConfig implements Validator {
workerConfig.setWorkerAddress(NetUtils.getAddr(workerConfig.getListenPort())); workerConfig.setWorkerAddress(NetUtils.getAddr(workerConfig.getListenPort()));
} }
workerConfig.setWorkerRegistryPath(REGISTRY_DOLPHINSCHEDULER_WORKERS + "/" + workerConfig.getWorkerAddress()); workerConfig.setWorkerRegistryPath(
RegistryNodeType.WORKER.getRegistryPath() + "/" + workerConfig.getWorkerAddress());
printConfig(); printConfig();
} }
private void printConfig() { private void printConfig() {
log.info("Worker config: listenPort -> {}", listenPort); String config =
log.info("Worker config: execThreads -> {}", execThreads); "\n****************************Worker Configuration**************************************" +
log.info("Worker config: heartbeatInterval -> {}", heartbeatInterval); "\n listen-port -> " + listenPort +
log.info("Worker config: hostWeight -> {}", hostWeight); "\n exec-threads -> " + execThreads +
log.info("Worker config: tenantAutoCreate -> {}", tenantAutoCreate); "\n heartbeat-interval -> " + heartbeatInterval +
log.info("Worker config: tenantDistributedUser -> {}", tenantDistributedUser); "\n host-weight -> " + hostWeight +
log.info("Worker config: maxCpuLoadAvg -> {}", maxCpuLoadAvg); "\n tenant-auto-create -> " + tenantAutoCreate +
log.info("Worker config: reservedMemory -> {}", reservedMemory); "\n tenant-distributed-user -> " + tenantDistributedUser +
log.info("Worker config: registryDisconnectStrategy -> {}", registryDisconnectStrategy); "\n max-cpu-load-avg -> " + maxCpuLoadAvg +
log.info("Worker config: workerAddress -> {}", workerAddress); "\n reserved-memory -> " + reservedMemory +
log.info("Worker config: workerRegistryPath: {}", workerRegistryPath); "\n registry-disconnect-strategy -> " + registryDisconnectStrategy +
log.info("Worker config: taskExecuteThreadsFullPolicy: {}", taskExecuteThreadsFullPolicy); "\n task-execute-threads-full-policy: " + taskExecuteThreadsFullPolicy +
"\n address -> " + workerAddress +
"\n registry-path: " + workerRegistryPath +
"\n****************************Worker Configuration**************************************";
log.info(config);
} }
} }

2
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/message/MessageRetryRunner.java

@ -69,7 +69,7 @@ public class MessageRetryRunner extends BaseDaemonThread {
log.info("Message retry runner staring"); log.info("Message retry runner staring");
messageSenders.forEach(messageSender -> { messageSenders.forEach(messageSender -> {
messageSenderMap.put(messageSender.getMessageType(), messageSender); messageSenderMap.put(messageSender.getMessageType(), messageSender);
log.info("Injected message sender: {}", messageSender.getClass().getName()); log.info("Injected message sender: {}", messageSender.getClass().getSimpleName());
}); });
super.start(); super.start();
log.info("Message retry runner started"); log.info("Message retry runner started");

3
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/rpc/WorkerRpcServer.java

@ -33,7 +33,8 @@ import org.springframework.stereotype.Service;
public class WorkerRpcServer extends SpringServerMethodInvokerDiscovery implements Closeable { public class WorkerRpcServer extends SpringServerMethodInvokerDiscovery implements Closeable {
public WorkerRpcServer(WorkerConfig workerConfig) { public WorkerRpcServer(WorkerConfig workerConfig) {
super(NettyRemotingServerFactory.buildNettyRemotingServer(new NettyServerConfig(workerConfig.getListenPort()))); super(NettyRemotingServerFactory.buildNettyRemotingServer(NettyServerConfig.builder()
.serverName("WorkerRpcServer").listenPort(workerConfig.getListenPort()).build()));
} }
public void start() { public void start() {

4
dolphinscheduler-worker/src/main/resources/logback-spring.xml

@ -23,7 +23,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern> <pattern>
[WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>
@ -61,7 +61,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern> <pattern>
[WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{96}:[%line] - %msg%n [WI-%X{workflowInstanceId:-0}][TI-%X{taskInstanceId:-0}] - [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} %logger{10}:[%line] - %msg%n
</pattern> </pattern>
<charset>UTF-8</charset> <charset>UTF-8</charset>
</encoder> </encoder>

Loading…
Cancel
Save