You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/12/24 07:15:14 UTC

[GitHub] [incubator-dolphinscheduler] xloya edited a comment on issue #4296: [Bug]After the workflow instance runs, it is manually stopped, but the workflow is always in a state of preparing to stop. The corresponding task (submitted a spark task) is always in the execution state, even if the applicationID submitted to yarn has been finished, the task is still in the execution state.

xloya edited a comment on issue #4296:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4296#issuecomment-750782976


   I met this problem too last month,i check the code in TaskKillProcessor.java.When kill yarn job,will execute it's process method,and you can see taskCallbackService.sendResult() method will close the netty channel.
   
   TaskKillProcessor.java/process()
   `taskCallbackService.sendResult(taskKillResponseCommand.getTaskInstanceId(), taskKillResponseCommand.convert2Command());`
   
   TaskCallbackService.java/sendResult()
   `public void sendResult(int taskInstanceId, Command command){
           NettyRemoteChannel nettyRemoteChannel = getRemoteChannel(taskInstanceId);
           nettyRemoteChannel.writeAndFlush(command).addListener(new ChannelFutureListener(){
               @Override
               public void operationComplete(ChannelFuture future) throws Exception {
                   if(future.isSuccess()){
                       remove(taskInstanceId);
                       return;
                   }
               }
           });
       }`
   
   So when i change the method taskCallbackService.sendResult() to taskCallbackService.sendAck(),the task will kill normally.I'm not sure if it is a bug,wish can help you.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org