[ https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15745856#comment-15745856 ]
ASF GitHub Bot commented on FLINK-5108: --------------------------------------- Github user mxm commented on the issue: https://github.com/apache/flink/pull/2928 There is one problem we overlooked. In detached mode we ensure cluster shutdown through a message sent by the client during job submission to tell the JobManager that this is going to be the last job it has to execute. In interactive execution mode, the user jar can contain multiple jobs; this is mostly useful for interactive batch jobs. Since we just execute the main method of the user jar, we don't know how many jobs are submitted and when to shutdown the cluster. That's why we chose to delegate the shutdown to the client for interactive jobs. Thus, I'm hesitant to remove the shutdown hook because it ensures that the cluster shuts down during interactive job executions. It prevents clusters from lingering around when the client shuts down. A couple of solution for this problem: 1. The JobManager watches the client and shuts down a) if it looses connection to the client and the job it executes has completed or b) the client tells the JobManager to shut down. 2. The JobManager drives the execution which is now part of the client 3. We don't allow multiple jobs to execute. Then we always have a clear shutdown point. This is perhaps the easiest and most elegant solution. Most users only execute a single job at a time anyways. We can still allow interactive job executions if the user chooses to. Perhaps we can make this more explicit in the API to give a hint to the client. I'm afraid we will have to close this PR until we realize one of the above solutions (or another one). > Remove ClientShutdownHook during job execution > ---------------------------------------------- > > Key: FLINK-5108 > URL: https://issues.apache.org/jira/browse/FLINK-5108 > Project: Flink > Issue Type: Bug > Components: YARN Client > Affects Versions: 1.2.0, 1.1.3 > Reporter: Maximilian Michels > Assignee: Renkai Ge > Fix For: 1.2.0 > > > The behavior of the Standalone mode is to not react to client interrupts once > a job has been deployed. We should change the Yarn client implementation to > behave the same. This avoids accidental shutdown of the job, e.g. when the > user sends an interrupt via CTRL-C or when the client machine shuts down. -- This message was sent by Atlassian JIRA (v6.3.4#6332)