caoyj1991 commented on a change in pull request #5983:
URL: https://github.com/apache/dolphinscheduler/pull/5983#discussion_r689212368
##########
File path:
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java
##########
@@ -102,19 +92,16 @@ public void process(Channel channel, Command command) {
case REMOVE_TAK_LOG_REQUEST:
RemoveTaskLogRequestCommand removeTaskLogRequest =
JSONUtils.parseObject(
command.getBody(), RemoveTaskLogRequestCommand.class);
-
- String taskLogPath = removeTaskLogRequest.getPath();
-
- File taskLogFile = new File(taskLogPath);
+ List<String> taskLogPaths = removeTaskLogRequest.getPath();
+ OsSystemNativeCommand os = new LinuxSystem();
+ String cmd = "";
+ for (String path : taskLogPaths){
Review comment:
这种场景下最适合的应该是一次性删除多文件的方式,而不是一个个删除的方案。
目前没发现在 java JDK 中有任何比较适合的 api 可以直接调用,可以一次性批量删除。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]