title: Application kill of spark on yarn via Zeppelin
body: <p>Is there a recommended way to application kill spark on yarn from inside Zeppelin (using scala)? In the spark shell I use </p>
  
  <pre><code>:q 
  </code></pre>
  
  <p>and it cleanly exits the shell, kills the application on yarn, and unreserves the cores I was using. </p>
  
  <p>I've found that I can use </p>
  
  <pre><code>sys.exit
  </code></pre>
  
  <p>which does kill the application on yarn successfully, but it also throws an error and requires that I restart the interpreter if I want to start a new session. If I'm actively running another notebook with a separate instance of the same interpreter then sys.exit isn't ideal because I can't restart the interpreter until I've finished the work in the second notebook.</p>