|
|
@ -17,11 +17,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.apache.dolphinscheduler.server.log; |
|
|
|
package org.apache.dolphinscheduler.server.log; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
|
import org.apache.dolphinscheduler.remote.NettyRemotingServer; |
|
|
|
import org.apache.dolphinscheduler.remote.NettyRemotingServer; |
|
|
|
import org.apache.dolphinscheduler.remote.command.CommandType; |
|
|
|
import org.apache.dolphinscheduler.remote.command.CommandType; |
|
|
|
import org.apache.dolphinscheduler.remote.config.NettyServerConfig; |
|
|
|
import org.apache.dolphinscheduler.remote.config.NettyServerConfig; |
|
|
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
@ -47,7 +47,7 @@ public class LoggerServer { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private final LoggerRequestProcessor requestProcessor; |
|
|
|
private final LoggerRequestProcessor requestProcessor; |
|
|
|
|
|
|
|
|
|
|
|
public LoggerServer(){ |
|
|
|
public LoggerServer() { |
|
|
|
this.serverConfig = new NettyServerConfig(); |
|
|
|
this.serverConfig = new NettyServerConfig(); |
|
|
|
this.serverConfig.setListenPort(Constants.RPC_PORT); |
|
|
|
this.serverConfig.setListenPort(Constants.RPC_PORT); |
|
|
|
this.server = new NettyRemotingServer(serverConfig); |
|
|
|
this.server = new NettyRemotingServer(serverConfig); |
|
|
@ -72,7 +72,7 @@ public class LoggerServer { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void start() { |
|
|
|
public void start() { |
|
|
|
this.server.start(); |
|
|
|
this.server.start(); |
|
|
|
logger.info("logger server started, listening on port : {}" , Constants.RPC_PORT); |
|
|
|
logger.info("logger server started, listening on port : {}", Constants.RPC_PORT); |
|
|
|
Runtime.getRuntime().addShutdownHook(new Thread() { |
|
|
|
Runtime.getRuntime().addShutdownHook(new Thread() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|