AngersZhuuuu commented on pull request #33869:
URL: https://github.com/apache/spark/pull/33869#issuecomment-912886208


   > @mridulm I would assume the ctrl-c would normally kill the init thread to 
run the shutdown hook, if it doesn't for some reason, I would think the worst 
case is we don't handle it in the stop call, but I assume that is no worse then 
what happens now with stop not called, is there something else I'm not thinking 
of that might happen?
   
   ctrl+c with a graceful shutdown should be reasonable and in graceful 
shutdown all start with a stop is necessary.
   For example, before  `taskScheduler.postStartHook()` we have start  event 
log writer, right? And we have post an application start event,  in event log 
writer's `stop()`,  we need to close writer and renameFile.
   ```
   
     /**
      * Stop logging events. The event log file will be renamed so that it 
loses the
      * ".inprogress" suffix.
      */
     override def stop(): Unit = {
       closeWriter()
       renameFile(new Path(inProgressPath), new Path(logPath), shouldOverwrite)
     }
   ```
   So we need to call this too when we use ctrl+c to stop application, right?
   
   I know it won't impact the job or other user cared things. 


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to