Frank Rosner created ZEPPELIN-815:
-------------------------------------

             Summary: Don't start the zeppelin runner in a child process when 
starting zeppelin.sh
                 Key: ZEPPELIN-815
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-815
             Project: Zeppelin
          Issue Type: Improvement
            Reporter: Frank Rosner


h3. Problem

We are trying to put a Zeppelin on top of our Spark cluster managed by 
[Nomad|https://www.nomadproject.io/]. Nomad manages to start Zeppelin 
instances, but it cannot stop them.

The reason is that the last command in {{zeppelin.sh}} creates a child process 
but does not communicate the signals properly:

{code}
$(exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH 
$ZEPPELIN_SERVER "$@")
{code}

When Nomad is now sending a SIGINT to zeppelin.sh, it still waits for Java to 
exit which will not happen because it does not tell it to exit.

h3. Proposed Solutions

h4. No Child Process

Don't spawn a new child process, so that the signal is directly sent to the 
runner:

{code}
exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH 
$ZEPPELIN_SERVER "$@"
{code}

h4. Send the Signal

Send the signal using a [combination of trap, kill and 
wait|http://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash].







--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to