You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by FRosner <gi...@git.apache.org> on 2016/04/19 20:12:22 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

GitHub user FRosner opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/844

    ZEPPELIN-815 don't create a sub shell for the runner

    ### What is this PR for?
    
    This pull request is supposed to fix ZEPPELIN-815. The issue is that one cannot stop Zeppelin by sending a signal, because it starts the runner in a sub shell. The pull request starts the runner in the same process as the `zeppelin.sh`, making it react to signals.
    
    ### What type of PR is it?
    
    Improvement
    
    ### Todos
    
    * [ ] - Task
    
    ### What is the Jira issue?
    
    https://issues.apache.org/jira/browse/ZEPPELIN-815
    
    ### How should this be tested?
    - Start `zeppelin.sh`
    - Get PID of the `zeppelin.sh` process
    - Send SIGINT (`kill -SIGINT <pid>`) to the `zeppelin.sh` process
    - Observe that Zeppelin is stopped
    
    ### Screenshots
    
    none
    
    ### Questions:
    * What is the reason to put an exec into a sub shell in the first place?

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

    $ git pull https://github.com/FRosner/incubator-zeppelin ZEPPELIN-815

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

    https://github.com/apache/incubator-zeppelin/pull/844.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 #844
    
----

----


---
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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844


---
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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844#issuecomment-212784586
  
    Looks good 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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844#issuecomment-212769849
  
    Thanks for your comment, @felixcheung. If the parent communicates the signal properly, it is not going to be a problem.
    
    I tested it and it seemed to work:
    
    ```sh
    frosner:nomad-zeppelin-spark/ (master*) $ nomad run zeppelin.nomad
    ==> Monitoring evaluation "c5396320"
        Evaluation triggered by job "zeppelin-job"
        Allocation "801ed0af" created: node "fae40394", group "zeppelin-group"
        Allocation "f6618daf" created: node "fae40394", group "spark-master-group"
        Evaluation status changed: "pending" -> "complete"
    ==> Evaluation "c5396320" finished with status "complete"
    ```
    
    ```sh
    frosner:incubator-zeppelin/ (ZEPPELIN-815) $ pstree | grep zeppelin
     | |   \--- 92143 frosner grep --color zeppelin
     |         |-+= 91991 root /usr/local/bin/nomad executor /tmp/NomadClient406688203/801ed0af-ebd1-32e8-20c3-3b3142bf6980/zeppelin-task/zeppelin-task-executor.out
     |         | \-+- 91993 root /usr/bin/java -Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m -XX:MaxPermSize=512m -Dzeppelin.log.file=/usr/local/zeppelin/logs/zeppelin--FAG-Book.local.log -cp ::/usr/local/zeppelin/lib/*:/usr/local/zeppelin/*::/usr/local/zeppelin/conf org.apache.zeppelin.server.ZeppelinServer
     |         |   \-+- 92109 root /bin/bash /usr/local/zeppelin/bin/interpreter.sh -d /usr/local/zeppelin/interpreter/spark -p 61507
     |         |     \--- 92117 root /usr/bin/java -Dfile.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dzeppelin.log.file=/usr/local/zeppelin/logs/zeppelin-interpreter-spark--FAG-Book.local.log -Xms1024m -Xmx1024m -XX:MaxPermSize=512m -cp ::/usr/local/zeppelin/interpreter/spark/dep/*:/usr/local/zeppelin/interpreter/spark/*::/usr/local/zeppelin/conf:/usr/local/zeppelin/conf:/usr/local/zeppelin/lib/zeppelin-interpreter-0.5.6-incubating.jar org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer 61507
    ```
    
    ```sh
    frosner:nomad-zeppelin-spark/ (master*) $ nomad stop zeppelin
    ==> Monitoring evaluation "383ba8c7"
        Evaluation triggered by job "zeppelin-job"
        Evaluation status changed: "pending" -> "complete"
    ==> Evaluation "383ba8c7" finished with status "complete"
    ```
    
    ```sh
    frosner:incubator-zeppelin/ (ZEPPELIN-815) $ pstree | grep zeppelin
     | |   \--- 92163 frosner grep --color zeppelin
    ```
    
    Probably because `interpreter.sh` (line 147) traps the signals and executes the shutdown hook:
    ```sh
    trap 'shutdown_hook;' SIGTERM SIGINT SIGQUIT
    ```


---
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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844#issuecomment-213170425
  
    merging if no more comment


---
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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844#issuecomment-212638923
  
    Would the interpreters be a problem for your case? Individual interpreter processes are started by interpreter.sh 


---
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] incubator-zeppelin pull request: ZEPPELIN-815 don't create a sub s...

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

    https://github.com/apache/incubator-zeppelin/pull/844#issuecomment-212115679
  
    + @Leemoonsoo 


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