[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751233#comment-15751233
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user Renkai closed the pull request at:

https://github.com/apache/flink/pull/2928


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


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751162#comment-15751162
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2928
  
Thanks for your understanding :) Could you please close this PR?


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


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15746832#comment-15746832
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user Renkai commented on the issue:

https://github.com/apache/flink/pull/2928
  
That is ok to close this issue.

Max 于2016年12月14日周三 02:31写道:

> 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).
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> , or 
mute
> the thread
> 

> .
>



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


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-13 Thread ASF GitHub Bot (JIRA)

[ 
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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15743050#comment-15743050
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user StephanEwen commented on the issue:

https://github.com/apache/flink/pull/2928
  
+1 for that approach


> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15742520#comment-15742520
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2928
  
I will go ahead and merge this PR since there have been no further comments.


> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722802#comment-15722802
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2928
  
I think the original intend of the Client shutdown hook was to make sure 
that clusters which are spawned and didn't receive jobs are cleaned up again. 
However, that behavior can be quite tricky because a job might actually have 
been submitted externally. So +1 for removing it altogether.


> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-05 Thread Andrew Efimov (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722400#comment-15722400
 ] 

Andrew Efimov commented on FLINK-5108:
--

Hi team,
I thought that in this issue we should implement:
1. ShutdownHook has to look like {{YarnClusterClient.stopAfterJob}}, to perform 
{{finalizeCluster}} after all jobs are completed or gracefully turn down all 
jobs(jobs cancellation)
2. "not having a shutdown hook at all" As [~mxm] mentioned, maybe there is 
logic which leaves some components are not in a consistent state. Should check 
it.
Does it make sense?

> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722196#comment-15722196
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user StephanEwen commented on the issue:

https://github.com/apache/flink/pull/2928
  
What speaks against not having a shutdown hook at all?



> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15721906#comment-15721906
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2928
  
Thanks for the PR! This removes the shutdown hook after the cluster has 
been deployed. The original intend was to remove it only after job submission. 
Probably it makes sense to remove it all-together. I have to think about it.

Perhaps @rmetzger could comment on this as well.


> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15718274#comment-15718274
 ] 

ASF GitHub Bot commented on FLINK-5108:
---

GitHub user Renkai opened a pull request:

https://github.com/apache/flink/pull/2928

[FLINK-5108] Remove ClientShutdownHook during job execution

This patch simply removed ClientShutdownHook  related code. The changes may 
cause `org.apache.flink.yarn.YarnClusterClient#pollingRunner` be brutely stoped 
by processing exit, but it seems ok because the polling runner thread is a 
daemon thread.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Renkai/flink FLINK-5108

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2928.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2928


commit 7504d57b2e24f70b96c0761102b689bf62653db5
Author: renkai 
Date:   2016-12-03T11:27:39Z

remove ClientShutdownHook




> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-02 Thread Renkai Ge (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714849#comment-15714849
 ] 

Renkai Ge commented on FLINK-5108:
--

I think it could be ready in this weekend,sorry for the lag since I'm still
reviewing the current code.

Robert Metzger (JIRA) 于2016年12月2日周五 19:01写道:



> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-12-02 Thread Robert Metzger (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714809#comment-15714809
 ] 

Robert Metzger commented on FLINK-5108:
---

Cool, thank you. When do you think the pull request will be ready? (I'm asking 
because this is a release blocker)

> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-11-29 Thread Renkai Ge (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15704795#comment-15704795
 ] 

Renkai Ge commented on FLINK-5108:
--

I want to work for this.

> 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
>Priority: Blocker
> 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)


[jira] [Commented] (FLINK-5108) Remove ClientShutdownHook during job execution

2016-11-21 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15683763#comment-15683763
 ] 

Stephan Ewen commented on FLINK-5108:
-

+1

> 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
>Priority: Blocker
> 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)