title: Spark Streaming Graceful Shutdown
body: <p>I saw there is an option to configure graceful shutdown in two places:</p>
  <ol>
  <li>While defining spark conf:</li>
  </ol>
  <blockquote>
  <p>&quot;spark.streaming.stopGracefullyOnShutdown&quot;, &quot;true&quot;.</p>
  </blockquote>
  <ol start="2">
  <li>When stopping the streaming context:</li>
  </ol>
  <blockquote>
  <p>JavaStreamingContext scc;</p>
  <p>scc.stop(true,true)</p>
  </blockquote>
  <p>What is the differences between the two options?</p>
  <p>Thanks</p>