You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by te...@apache.org on 2020/02/14 13:56:14 UTC
[incubator-dolphinscheduler] 03/03: Merge branch
'refactor-architecture' into refactor-architecture
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch refactor-architecture
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
commit 43bc56625306751496f6891da6edba11e169f1ed
Merge: 1e812ca 820b84b
Author: Tboy <te...@yeah.net>
AuthorDate: Fri Feb 14 21:56:03 2020 +0800
Merge branch 'refactor-architecture' into refactor-architecture
.../api/service/LoggerService.java | 39 ++++----
.../remote/NettyRemotingClient.java | 56 +++++++++---
.../dolphinscheduler/remote/command/Command.java | 6 +-
.../remote/command/ExecuteTaskRequestCommand.java | 2 +-
.../remote/command/ExecuteTaskResponseCommand.java | 2 +-
.../dolphinscheduler/remote/command/Ping.java | 4 +-
.../command/log/GetLogBytesRequestCommand.java | 4 +-
.../command/log/RollViewLogRequestCommand.java | 4 +-
.../remote/command/log/ViewLogRequestCommand.java | 4 +-
.../exceptions/RemotingTimeoutException.java | 20 ++++
.../remote/future/InvokeCallback.java | 10 ++
.../remote/future/ResponseFuture.java | 101 +++++++++++++++++++++
.../remote/handler/NettyClientHandler.java | 56 +++---------
.../remote/NettyRemotingClientTest.java | 14 +--
.../server/utils/ProcessUtils.java | 4 +-
.../service/log/LogClientService.java | 99 ++++++++------------
16 files changed, 258 insertions(+), 167 deletions(-)
diff --cc dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/LoggerService.java
index bff54b6,f20f657..1f65208
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/LoggerService.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/LoggerService.java
@@@ -64,18 -77,10 +77,9 @@@ public class LoggerService
Result result = new Result(Status.SUCCESS.getCode(), Status.SUCCESS.getMsg());
logger.info("log host : {} , logPath : {} , logServer port : {}",host,taskInstance.getLogPath(),Constants.RPC_PORT);
- LogClientService logClient = null;
- try {
- logClient = new LogClientService(host, Constants.RPC_PORT);
- String log = logClient.rollViewLog(taskInstance.getLogPath(),skipLineNum,limit);
- result.setData(log);
- logger.info(log);
- } finally {
- if(logClient != null){
- logClient.close();
- }
- }
-
+ String log = logClient.rollViewLog(host, Constants.RPC_PORT, taskInstance.getLogPath(),skipLineNum,limit);
+ result.setData(log);
+ logger.info(log);
-
return result;
}