You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by rmetzger <gi...@git.apache.org> on 2016/02/02 17:30:08 UTC

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

GitHub user rmetzger opened a pull request:

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

    [hotfix][yarn] Shutdown JVM when Flink-on-yarn is shutting down

    With this change, we call System.exit() when the YARN session is shutting down.
    
    On some Linux distributions, YARN is not able to stop containers because the "kill" command has different arguments. For example when running Flink on GCE ("Debian GNU/Linux 7.9 (wheezy)"), YARN containers will not properly shut down.
    
    I propose to apply this change to 0.10 as well.
    
    I tested this on GCE (multiple times, also by externally killing the app)

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

    $ git pull https://github.com/rmetzger/flink yarn_system_exit

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

    https://github.com/apache/flink/pull/1576.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 #1576
    
----
commit bc47608ed2568ba35c7103257a106b0abcd7c28e
Author: Robert Metzger <rm...@apache.org>
Date:   2016-02-02T15:36:49Z

    [hotfix][yarn] Shutdown JVM when Flink-on-yarn is shutting down

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by chiwanpark <gi...@git.apache.org>.
Github user chiwanpark commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-178965393
  
    +1 This problem occasionally occurs in Amazon EMR 4.2.0.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179156172
  
    I would like to include this in the 0.10.2 RC. Has anyone already looked into the delay vs. flush question?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179231177
  
    The `ActorSystem.shutdown` call is non-blocking. But the `ActorSystem` has also a `awaitTermination(timeout)` call which could be used to await the termination of the `ActorSystem`. That could also be used in the spawned thread as wait condition.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179124457
  
    Could we flush standard out and the log system explicitly?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179121680
  
    Looks good, and important fix.
    
    I was wondering whether it would be good brief delay (5-10 secs or so) before the `System.exit()` call, to allow the messaged and LOG to be processed before the JVM is killed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by mxm <gi...@git.apache.org>.
Github user mxm commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179113125
  
    +1 Makes sense to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179177068
  
    Not sure we can control the log flushing. With synchronous logging, it is probably not too much of an issue.
    
    More tricky is the actor messages sent by the YarnJobManager to the client (info message that shut down is happening).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [hotfix][yarn] Shutdown JVM when Flink-on-yarn...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the pull request:

    https://github.com/apache/flink/pull/1576#issuecomment-179208110
  
    In an offline discussion with Stephan and Till, we came to the conclusion that spawning a thread which kills the JVM after a few seconds is the most straightforward thing to do (given that this part of the system is being refactored right now). Robert, what do you think about this? Can you update the PR accordingly?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---